Tips Linux Explorers   All Things Linux Forum   Great Linux Links   LinuxClues.com   Hometown   Email 



CHANGING HOSTNAME
( In Mandriva, PCLOS, Fedora, Slackware, Debian & Knoppix )


There are 2 ways to change the host name, a temporary and a permanent way.

1). Giving the command:

CODE
$ hostname jupiter

Will change the hostname to "jupiter" untill the next reboot.



2). The "permanent" way is a bit different depending the distro you run:

Fedora, Mandriva, PCLos
If you want the hostname to stick even after a reboot in Fedora,Mandriva or PCLos there are 2 files to change: the /etc/sysconfig/network and the /etc/hosts:
In the /etc/sysconfig/network I added the line:

CODE
HOSTNAME=jupiter

Next in the /etc/hosts file I changed the "127.0.0.1 localhost.localdomain localhost" to:

CODE
127.0.0.1       jupiter localhost

Finally reboot and you will see that the hostname is set.



Slackware & Debian
In Slackware and Debian you set the hostname during the install, it is stored in /etc/HOSTNAME ( Slackware ) and /etc/hostname ( Debian )



Knoppix ( HD install )
For Knoppix see tip about changing hostname in D Small Linux Here



Bruno



-- Jan 9 2006 --



Tips Linux Explorers   All Things Linux Forum   Great Linux Links   LinuxClues.com   Hometown   Email