Wednesday, August 10, 2011

Easy Understanding - Changing hostname in Linux(Ubuntu)

Hey Guys!!!....this is a common practice when you are testing some applications like bind to configure the DNS Server on your system. Let me provide you some simple steps to change the hostname of the running ubuntu and relative linux distribution.

[root@localhost~:]#hostname new_name
This will set the hostname as new_name. But this gets washed out as soon as the system reboots. So we need to find a permanent fix.... :)

Edit the following files to hardcode the hostname.
[root@localhost~:]#nano /etc/hostname
[root@localhost~:]#nano /etc/hosts

Cheers

No comments:

Post a Comment