以Ubuntu为例 1. 直接修改/etc/hostname 中的名字为新的主机名(例如`UFO`), 参考[例程](https://blog.csdn.net/dengjin20104042056/article/details/80462511) 2. 再在/etc/hosts 中增加一行映射(`127.0.0.1 UFO`), 参考[例程, 和上面是同一个](https://blog.csdn.net/dengjin20104042056/article/details/80462511)或者[例程2](https://www.globo.tech/learning-center/sudo-unable-to-resolve-host-explained/#:~:text=%20Sudo%3A%20unable%20to%20resolve%20host%20explained%20,%E2%80%9Csudo%3A%20unable%20to%20resolve%20host%E2%80%9D%20error...%20More%20) 3. 可能需要重启
以Ubuntu为例
UFO), 参考例程127.0.0.1 UFO), 参考例程, 和上面是同一个或者例程2