How To Set The Hostname On Ubuntu Or Debian?

$ sudo hostnamectl set-hostname your-hostname

$ sudo vim /etc/hosts

Open the hosts file and add the following line:

127.0.1.1  your-hostname

猜你喜欢

转载自www.cnblogs.com/mouseleo/p/11955635.html