RSS

Changing hostname on debian

13 Jan

Permanent hostname change on Debian based Linux systems

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 start to make the change active.

The hostname saved in this file (/etc/hostname) will be preserved on system reboot (and will be set using the same script we used hostname.sh).

Advertisements
 
Leave a comment

Posted by on January 13, 2012 in Uncategorized

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

 
%d bloggers like this: