转自Ubuntu 修改hosts


Ubuntu系统的Hosts只需修改/etc/hosts文件,在目录中还有一个hosts.conf文件,刚开始还以为只需要修改这个就可以了,结果发现是需要修改hosts。修改完之后要重启网络。
具体过程如下:
1、修改hosts
sudo gedit /etc/hosts
2、添加解析记录( . )
完整案例:127.0.0.1 localhost.localdomain localhost
简洁记录:127.0.0.1 localhost
3、保存后重启网络
sudo /etc/init.d/networking restart

相关文章:

  • 2022-01-12
  • 2022-12-23
  • 2022-03-09
  • 2022-01-23
  • 2022-02-01
  • 2021-12-07
  • 2022-02-05
  • 2022-02-14
猜你喜欢
  • 2022-12-23
  • 2022-01-05
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案