直接terminal 输入hostname
打卡文件/etc/hostname vi /etc/hostname
vi /etc/hosts (注意ip 与主机名之间的空格)
如果有多台虚拟机,需要通信 可选择远程发送 scp [-r] 本机目录(文件) 远程主机root用户@ip:目录
centos7配置主机名和主机映射
原文:https://www.cnblogs.com/sgy-walt/p/12394882.html