How to use the hostname command to change the hostname on a redhat Linux:
1.Replace the contents of /proc/sys/kernel/hostname
# echo new-host-name > /proc/sys/kernel/hostname
2.Restart the network interfaces:
# /etc/init.d/network restart
Shutting down interface venet0: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface venet0: RTNETLINK answers: File exists
RTNETLINK answers: File exists
[ OK ]
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment