更改hostname
1,hostname,显示当前hostname
2,sudo vi /etc/hostname 修改为需要的hostname
3,sudo vi /etc/hosts
修改:
127.0.0.1 localhost
127.0.1.1 PigJune---change to what your hostname
否则会出现sudo: 无法解析主机 :xxxxx
更改hostname
1,hostname,显示当前hostname
2,sudo vi /etc/hostname 修改为需要的hostname
3,sudo vi /etc/hosts
修改:
127.0.0.1 localhost
127.0.1.1 PigJune---change to what your hostname
否则会出现sudo: 无法解析主机 :xxxxx