How to Change the Computer Name in Ubuntu

  1. Open a terminal window.

2. At the input prompt you will see this structure:
nicholas@computer-name:~$ _ “

  1. So you have to edit the hostname file:
    sudo nano /etc/hostname “

  2. When prompted, enter the administrator password and hit Enter.

  3. The hostname file will open, showing the current computer name. Replace the name with the desired new name.

  4. Hit Ctrl+X to save and exit.

  5. New name will show when you open a new terminal window.

Show Comments