How to change the host name of Linux computer

On a Linux computer, you can change the host name anytime you like following the method given below after opening a terminal window.

$ sudo vi /etc/hosts <enter>

127.0.0.1 mycomputer.mydomain.com <enter> :wq

$ sudo vi /etc/hostname <enter> Insert mycomputer.mydomain.com <enter> :wq

$ sudo hostname -F /etc/hostname <enter>

Now check if hostname has changed $ . . . → Read More: How to change the host name of Linux computer

Change host name in Fedora Linux

To change the host name on Fedora Linux, do the following:

Open a terminal window Login as root Add the host name to /etc/hosts Add the host name to /etc/syconfig/network Reboot your computer

Add the host name to /etc/hosts

# vi /etc/hosts <enter> Add below line to the end of the file 192.168.1.101 . . . → Read More: Change host name in Fedora Linux

September 2019
M T W T F S S
« Aug    
 1
2345678
9101112131415
16171819202122
23242526272829
30