Change Hostname

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. 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 start

To make the change active. The hostname saved in this file will be saved on system reboot.

Leave a Reply

Your email address will not be published. Required fields are marked *