Basic Ubuntu tutorial -- how to modify the name of your computer

Source: Internet
Author: User

This article is also an article for new Ubuntu users and new users. It will guide you how to easily change your computer name when using Ubuntu, many users never consider changing the computer name or host name on Ubuntu, which is the last thing they have to worry about.

Many users will use the names created or set during Ubuntu installation, but new users who want to know how to change their names can continue to learn. This article is not prepared for Ubuntu experts, but for beginners who have just started using Ubuntu.

So why do you want to change your computer name? If you want to learn how to operate, you don't have a good reason. Otherwise, if you have a good reason or want to learn how to operate, continue.

Press Ctrl-Alt-T to open the terminal. When the terminal opens, enter the following command and use gedit to edit the hostname file.

Sudo gedit/etc/hostname

Next, no matter what the old computer name is, change it to a new one. For example, if you want your computer to be named "RDOMNU", first delete the file content, enter RDOMNU, and then save the file.

Then, run the following command to open the hosts file:

Sudo gedit/etc/hosts

Change the value of the position marked by the arrow in the second line so that it matches the name of the computer you just entered. After that, save the file.

That's it! Restart your computer and your machine will display a new name. This is how to change the name of the Ubuntu machine.

Try it!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.