Namran Hussin Linux hostname change..

hostname change..

and the next thing is the hostname.

Permanent hostname change on RedHat based systems

RedHat based system use the file /etc/sysconfig/network to read the saved hostname at system boot. This is set using the init script /etc/rc.d/rc.sysinit

/etc/sysconfig/network
NETWORKING=yes
HOSTNAME=”plain.domainname.com”
GATEWAY=”192.168.0.1?
GATEWAYDEV=”eth0?
FORWARD_IPV4=”yes”

So in order to preserve your change on system reboot edit this file and enter the appropriate name using the HOSTNAME variable. Use sysctl to change the hostname

Why would someone need a different method of doing the same thing as above? No idea, but here is anyway: use sysctl to change the variable kernel.hostname: Use:

sysctl kernel.hostname

to read the current hostname, and

sysctl kernel.hostname=NEW_HOSTNAME

to change it.

Related Post

Installing WICD for wireless connection User interface in CentOS 5.6Installing WICD for wireless connection User interface in CentOS 5.6

First download the package from website : wget http://downloads.wicd.net/pkgs/stable/1.6.x/1.6.2/CentOS_5/wicd-1.6.2-2.1.x86_64.rpm rpm -ivh wicd-1.6.2-2.1.x86_64.rpm then install the dependencies for this .. as it require python-urwid .. assume you have install rpmforge repo.