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.
1. Click the icon in the upper right corner of the system and select as shown
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.
3. Fill in the name you like and then close the window. No need to restart the computer.
4. Re-open the Terminal terminal. The host name has been modified.
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.
6. This method is not applicable if you modify the host name on the network. As shown in the figure below
7. To modify the host name on the network, you need to enter: sudo gedit /etc/hosts, as shown in the figure
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!