Friday, December 27, 2013

Change Host-Name in Linux

Display Hostname

To display the current hostname, we can use hostname command.


Change Hostname

We've to update two files:

/etc/sysconfig/network  or /etc/hostname

To add/remove hosts on Redhat / CentOS / Fedora / Debian / Ubuntu

#vim /etc/hosts
save and close :wq
Note: add all required hosts with IP

To add/remove hostname on Redhat / CentOS / Fedora

#vim /etc/sysconfig/network

save and close :wq


To add/remove hostname on Debian / Ubuntu

#vim /etc/hostname

save and close :wq


No comments:

Connect MS-SQL Database on PHP under Ubuntu-18.04

I can see that several tutorials available over Internet for "Connecting Ms SQL by PHP code on Ubuntu 18.04", But as much as I sa...