Changing your host name - Redhat Ent 4 & 5
Logged in as root
%cd /etc/sysconfig
%vi network
HOSTNAME=loki
When you are done, save your changes and exit vi. Next we will edit the /etc/hosts file and set the new hostname.
%vi /etc/hosts
Edit/Add the line for your host's IP with new hostname
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
192.168.1.70 loki
Save and exit.
You nee to change two files /etc/hosts and /etc/sysconfig/network to make hostname permanent.
now restart network service.
%service network restart
logout and log back in.
Logged in as root
%cd /etc/sysconfig
%vi network
HOSTNAME=loki
When you are done, save your changes and exit vi. Next we will edit the /etc/hosts file and set the new hostname.
%vi /etc/hosts
Edit/Add the line for your host's IP with new hostname
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
192.168.1.70 loki
Save and exit.
You nee to change two files /etc/hosts and /etc/sysconfig/network to make hostname permanent.
now restart network service.
%service network restart
logout and log back in.
Comments
Post a Comment