Daily Ubuntu Tips – Change Computer Name

This post is part of our new series called Daily Ubuntu Tips where we show students and new users how to do basic tasks on Ubuntu. This series is geared towards newbies who want to learn how to manage Ubuntu systems.

The first post in the in this series is how to change Ubuntu computer name. This should apply to all versions of Ubuntu including, Ubuntu 17.04 | 17.10 and future releases.

Folks get the chance to add the system name during Ubuntu installation. The name assigned at installation will stay in place until you change it. To change it, use the guide below.

Changing Ubuntu system name isn’t necessary. However, to learn how to manage Ubuntu, new users may want to learn the basics. Changing Ubuntu system name won’t hurt anything as well, and you can change it as many times as you’d like. You can also keep the computer name in place for ever without changing it.

To change your computer name, run the commands below to open the computer hostname file.

sudo nano /etc/hostname

When the file opens, replace the name in the file with its replacement (new name) and save.


Next, run the commands below to open the hosts file.

sudo nano /etc/hosts

Then change the line that corresponds to the hostname above.                                    localhost                                    ubuntu1704

# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Save the file and exit.

Restart your computer for the changes to apply.

Congratulations! You’ve just learned how to change Ubuntu system name.


This post shows students and new users how to change Ubuntu system name. The post is intended for newbies who just want to learn some basic tasks in Ubuntu.

When the changes are done above, restart and your computer should now be recognize by its new name.


You may also like the post below:

One Reply to “Daily Ubuntu Tips – Change Computer Name”

  1. I am really enjoying the theme/design of your blog. Do you ever run into any browser compatibility
    problems? A couple of my blog audience have complained about my blog not
    working correctly in Explorer but looks great in Chrome. Do you have any advice
    to help fix this problem?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.