Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 550 Bytes

hostnamectl.md

File metadata and controls

24 lines (18 loc) · 550 Bytes

hostnamectl

The procedure to change the computer name on Ubuntu 20.04 LTS:

Type the hostnamectl command :

sudo hostnamectl set-hostname newNameHere

Delete the old name and setup new name.

Next Edit the /etc/hosts file:

sudo nano /etc/hosts

Replace any occurrence of the existing computer name with your new hostname.

Reboot the system to changes take effect:

sudo reboot

Reading Material