文章目录背景Linux如何修改主机名(hostname)方法方法1. 使用 `hostnamectl` 命令示例 2. 编辑 `etchostname` 文件注意事项 背景 我创建虚拟机的时候没设置主机名,现在显示local...