Click to See Complete Forum and Search --> : how do i set my own hostname


hetman
08-23-2001, 12:16 AM
hi there,
how do i set my own hostname?
im tired or seeing
root@localhost
i want to change it, ex.
root@myhostname
or something.
please help

WilliamWallace
08-23-2001, 01:33 AM
go into /etc/hostname and change it.

MacDaddy
08-23-2001, 02:57 AM
For me, it's /etc/hosts
Then just change the hostname for your interface. Here's what mine looks like:

127.0.0.1 localhost.localdomain localhost
192.168.1.2 macdaddy.macclan.fam macdaddy

-Gordon

bdg1983
08-23-2001, 06:40 AM
The main config file for hostname is /etc/HOSTNAME, but you would be advised to use the proper tools to make the change as I believe that file is not the only one that needs to be changed.

Using the correct method will ensure all is done in the proper fashion.

I would advise you to read the manual page for hostname. man hostname

GuruWannabe
08-23-2001, 06:42 AM
You didn't mention which distro you have. If you have Mandrake, there's no /etc/hostname file. I had this same problem, but I went to the Mandrake control center and changed it there. After a reboot, everything was fine.