Kali Linux hosts and host.conf

来源:互联网 发布:尚学堂java视频教程 编辑:程序博客网 时间:2024/06/11 15:15

host.conf定义了解析器查询配置文件的顺序

root@zrools:~# cat /etc/host.conf order hosts,bind  #解析器查询顺序是文件/etc/hosts,然后是DNSmulti on   #允许主机拥有多个ip地址nospoof on #禁止ip地址欺骗
root@zrools:~# cat /etc/hosts127.0.0.1       localhost

修改 /etc/hosts不生效请尝试:

  • 重启网络服务或重启
  • 检查/etc/host.conf配置
root@zrools:~# service networking restart
0 0