Home  >  Article  >  System Tutorial  >  How to change hostname in ubuntu16.04?

How to change hostname in ubuntu16.04?

WBOY
WBOYforward
2024-01-02 15:18:10606browse

The host name in ubuntu is the default, but it can also be modified. Let’s take a look at the tutorial on changing the host name in ubuntu16.04.

How to change hostname in ubuntu16.04?

1. Click the icon in the upper right corner of the system and select as shown

How to change hostname in ubuntu16.04?

2. After clicking the About This Computer button, the following details will pop up. Select Overview. After the Device name title, you can see the host name currently in the editable state.

How to change hostname in ubuntu16.04?

3. Fill in the name you like and then close the window. No need to restart the computer.

How to change hostname in ubuntu16.04?

4. Re-open the Terminal terminal. The host name has been modified.

How to change hostname in ubuntu16.04?

5. Compared with the method of modifying files, it is faster and more convenient. Paste the method of modifying files: Enter gedit /etc/hostname in the terminal, as shown in the figure.

How to change hostname in ubuntu16.04?

6. This method is not applicable if you modify the host name on the network. As shown in the figure below

How to change hostname in ubuntu16.04?

7. To modify the host name on the network, you need to enter: sudo gedit /etc/hosts, as shown in the figure

How to change hostname in ubuntu16.04?

The above is the detailed content of How to change hostname in ubuntu16.04?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:jb51.net. If there is any infringement, please contact admin@php.cn delete