ubuntu 更改计算机名

简单操做步骤以下:html

$ sudo apt install gksu
$ gksudo gedit /etc/hostname

#在打开的文本中更改计算机名,而后单击“保存”
$ sudo reboot

参考: https://www.cnblogs.com/aqi0530/p/3705432.htmlwindows

Ubuntu: How to Change the Computer Name

You might run into a situation that requires you to change your computer name, either because you need it to meet a naming scheme or you’re just bored with it and want something better. By following these steps, you’ll give your computer a new identity in no time.ide

1. Open a terminal window.ui

2. Input the following command and hit Enter:gksudo gedit /etc/hostnamerest

3. When prompted, enter the administrator password and click the OK button.code

4. The hostname file will open, displaying the current computer name. Replace the current computer name with the desired new name.htm

5. Click Save.blog

6. Close all open windows and restart your system.terminal

After your system has restarted, it will have the new computer name.get