This is a discussion on Is this possible within the Linux forums, part of the Operating Systems category; Is it possible to change the hostname of a Linux machine? If so what are the steps for doing this. ...
|
|||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
You can also use hostname on any Linux system with the command ‘hostname‘with parameters as below:
#hostname –fqd The above would output the fully qualified domain name (or FQDN) of the system. #hostname NEW_NAME The above parameter option would set the hostname of the system to NEW_NAME. |
|
|||
|
If you use a Debian based Linux systems you can achieve Permanent hostname change as follows:
Debian based systems use the file /etc/hostname to read the hostname of the system at boot time and set it up using the init script /etc/init.d/hostname.sh #cat /etc/hostname debianadmin So on a Debian based system we can edit the file /etc/hostname and change the name of the system and then run /etc/init.d/hostname.sh startto make the change active. The hostname saved in this file (/etc/hostname) will be preserved on system reboot |
![]() |
| Thread Tools | |
|
|