In this post, I have came forward with the instructions and guidance to set the permanent hostname for the CentOS box.

Centos LogoIn this video, you find the needed configurations to setup the HOSTNAME.

The ip-address you see in the /etc/hosts file has been acquired from the concerned system, using the “ifconfig” command. The ipaddress is needed to mention the hostname in the hosts file. However you can find the ipaddress of your own computer using Ifconfig command in TUI (terminal) mode.

The setup has been chosen in the CentOS platform, as the demand is noticed in high. You can follow the same instruction for other Linux distributions, however the path, commands, Shell usage affects the process.

Here I have used “nano” as text editor to edit the configurations files, however you can use you favorite text editor; VI, CAT or other’s. After i have used the nano /etc/sysconfig/network   or other files editing, i have manipulated the files and i have saved the configurations using the CTRL+X  buttons click and pressing the Y button for the asked query, whether to save the changes or not by the nano editor; so i am saying yes to save the things. This will save the configured things.

you do need to exit the current working shell to notice the changes of hostname. However it is recommended to logout of the box after changes and login back again.  The next post about how to set-up DNS will be published soon.

Here in the video, the hostname has been mentioned as linuxbox1, and the fqdn has been assigned as the linuxbox.centos1; however it is recommended to use the linux box as the hostname or to change the fqdn to be as linuxbox1; both are acceptable.  (edited-16-06-10)

If you have any queries,  comment here or else you can reach me @ twitter.com/chaladhi     or   facebook.com/chaladi