How to Change Computer Name in Ubuntu
-
Open a terminal window.
-
At the input prompt you will see this structure:
nicholas@computer-name:~$ _
- So you have to edit the hostname file:
sudo nano /etc/hostname
-
When prompted, enter the administrator password and hit Enter.
-
The hostname file will open, showing the current computer name. Replace the name with the desired new name.
-
Hit Ctrl+X to save and exit.
-
New name will show when you open a new terminal window.