centos下修改hosts文件以及生效命令

修改

vim /etc/hosts

生效

service network restart
或者
/etc/init.d/network restart