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

posted on 2019-11-29 09:02  刘应杰  阅读(132)  评论(0编辑  收藏  举报

导航