joaotelles
asked on
Linux RedHat5 - Change hostname of the machine
Hi,
I have a redhat 5 installation and I want to change the hostname of it..
This is the name now:
[root@localhost ~]# hostname
localhost.localdomain
I will edit this file:
/etc/sysconfig/network
But do I need to restart the mahcine to have changed?
Tks,
Joao
I have a redhat 5 installation and I want to change the hostname of it..
This is the name now:
[root@localhost ~]# hostname
localhost.localdomain
I will edit this file:
/etc/sysconfig/network
But do I need to restart the mahcine to have changed?
Tks,
Joao
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Yes, with above commands I presumed that you will already be root user.
Furthermore, you have to do combination of both because without this it will not persist after reboot.
Furthermore, you have to do combination of both because without this it will not persist after reboot.
Farzanj, you are correct on the reboot not keeping the name..
how silly of me to forget that
how silly of me to forget that
Hi R Edwards, Not silly at all. Your solution fixes the problem. I was just luck to get first :)
Have a nice day!
Have a nice day!
ASKER
Tks.
sudo hostname new.hostname