Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to change the Localhost name in the prompt

Status
Not open for further replies.

Tack24

Programmer
Oct 6, 2002
64
US
Anyone Could help or direct me To how i would go about Makeing My [root@localhost Linux]#
to say [root@PetiPitou Linux]#
 
Edit the /etc/sysconfig/network file and type hostname = PetiPitou. You may want to restart the network for the changes to immediately show --> /sbin/service network restart.

The above works on Red Hat, but it could be different on some distro's.

ChrisP ------------------------------------------------------------------------------
If somebody helps you, please vote for them for "Tipmaster of the Week" by giving them a "purple star". This can be done by clicking the "Mark this post as a helpful/expert post" button.
 
Hey thanks man I done it, It worked out great Thanks Alot:)))
i dont see helpful/expert post" button.
 
Hey, i have redhat , But when i change the hostname to PetiPitou. an reboot it takes me in a text login an Wont let me in a graphical login or anything graphical, like as if i telneted To my box an only seein the Shell But when i change it back to Localhost.localdomain it lets me back into a graphical log in !! can You tell me why?

p.s...Could it be because of two capital letters PetiPetou two PP?
 
"p.s...Could it be because of two capital letters PetiPetou two PP?" --> NO.

Try adding your new hostname to the /etc/hosts file. Maybe it can't resolve the name. Put your IP and new hostname on a separate line. Don't delete the loopback stuff.


ChrisP ------------------------------------------------------------------------------
If somebody helps you, please vote for them for "Tipmaster of the Week" by giving them a "purple star". This can be done by clicking the "Mark this post as a helpful/expert post" button.
 
Yep that worked i rebooted the computer an it let me have a graphical log in
Thanks:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top