centos下修改hosts文件以及生效命令 vi /etc/hosts 在文件末尾插入与windows下类似的结构语 127.0.0.1 www.9aw.cn 修改完成之后,重启网络即可生效 /etc/init.d/network restart