In this tutorial, we will see how to change your computer name (hostname) permanently under the following Ubuntu distros:

  • Ubuntu 14.10/14.04 or older
  • Linux Mint distros

Open the terminal and run this command to know your current hostname:


To change it, edit this file first:

sudo gedit /etc/hostname

Change the hostname displayed to any name of your choice, save your file and close it.

 Next, edit this file:

sudo gedit /etc/hosts

Change also the hostname displayed to your choice as written in the first file. Save your file and reboot your system. Your computer name is now modified to the one selected.

Post a Comment