1.进入host文件位置:cd /etc/ 2.编辑hosts文件:vi /etc/hosts3.修改方式类似windows 4.重启系统reboot5.访问ping www.xxx.com,能正常ping通。