- Modify hostname
hostnamectl set-hostname master
bash
- Reason: The ubuntu device name of the host is modified, and the hosts file is not configured later, causing linux to be unable to resolve to your host address
sudo: 无法解析主机:xxxxxx
- Solution: It can be solved by configuring the hosts file. The specific operations are as follows:
sudo vim /etc/hosts
- Modify the xxxx behind the number below to your current device name and save it.
127.0.1.1 xxxx