永发信息网

ubuntu下hosts文件改坏了怎么办

答案:2  悬赏:20  手机版
解决时间 2021-02-03 05:04
  • 提问者网友:末路
  • 2021-02-03 01:57
ubuntu下hosts文件改坏了怎么办
最佳答案
  • 五星知识达人网友:狂恋
  • 2021-02-03 02:12
原始文件内容如下,把改过的内容删除即可。

127.0.0.1 localhost

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
全部回答
  • 1楼网友:怀裏藏嬌
  • 2021-02-03 02:47
可以直接用mv mv 新文件 /etc/hosts但是这样就是删掉原有的文件  , 建议先备份原有文件 mv /etc/hosts /etc/hosts.copia mv 新文件 /etc/hosts或者先备份原文件 , 然后对原文件进行修改 cp /etc/hosts /etc/hosts.copia vi /etc/hosts这个方法可以在出错的时候重新使用原文件 mv /etc/hosts.copia /etc/hosts
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯