Hostname 即主机名,一般存放在 /etc/hostname 中。hosts 即本地域名解析文件,存放在 /etc/hosts 中。

二、测试

2.1 hostname

Ubuntu更新Hostname和hosts

2.2 hosts

Ubuntu更新Hostname和hosts

修改 hosts 后,使 hosts 文件修改生效:
sudo /etc/init.d/dns-clean start
sudo /etc/init.d/networking restart

Ubuntu更新Hostname和hosts

相关文章:

  • 2021-05-17
  • 2022-12-23
  • 2021-09-11
  • 2021-08-09
  • 2022-12-23
  • 2022-01-31
  • 2021-12-22
猜你喜欢
  • 2022-12-23
  • 2021-06-18
  • 2022-12-23
  • 2021-12-16
  • 2022-12-23
  • 2022-12-23
  • 2021-11-22
相关资源
相似解决方案