All about Information Technology!

Change the hostname or computer name in linux

1. Open a terminal window.
2. Type the following command and hit Enter:

sudo gedit /etc/hostname

3. Replace the current computer name with the desired new name and save.
4. Type the following command:

sudo gedit /etc/hosts

5. Change the old 127.0.1.1 line to your new hostname.
6. Reboot

, , , , , ,