终端运行sudo nano /etc/hosts然后就可以在里面编辑hosts文件了,弄好以后ctrl+o回车保存,ctrl+x退出 转载于:https://www.cnblogs.com/tianshiaimi/p/5021884.html