环境:kali linux

这个问题是再用apt install命令安装软件时发现的

用ping www.xxxxxxxx.com 再次确认无法解析域名

参考:

https://www.cnblogs.com/zylq-blog/p/6654586.html    kali域名解析错误解决

http://ddrv.cn/a/177111     kali 更新域名解析失败问题解决办法

https://blog.csdn.net/weixin_40943540/article/details/82943280   Linux无法解析域名

https://blog.csdn.net/g73269565/article/details/84978811   linux 出现 无法解析域名 设置DNS

 

域名不解析成ip,应该是dns的配置问题。

那么修改resolv.conf配置(要在root权限下)

su

输入root密码
vim  /etc/resolv.conf

在nameserver xxx.xxx.xxx.xxx后添加

nameserver 202.96.134.133

nameserver 8.8.8.8

nameserver 114.114.114.114

 

:wq  保存后

重启一下网络或者虚拟机就可以了

 

注意只需要替换nameserver,其他的内容可以复制粘贴下来

如果发现保存不了,将resolv.conf删除,

再重新建立一个resolv.conf文件,

vim /etc/resolv.conf

nameserver 202.96.134.133

nameserver 8.8.8.8

nameserver 114.114.114.114

相关文章:

  • 2022-12-23
  • 2021-04-27
  • 2022-01-23
  • 2021-09-06
  • 2022-02-01
  • 2022-12-23
  • 2021-10-19
  • 2021-06-18
猜你喜欢
  • 2021-11-27
  • 2022-12-23
  • 2021-12-28
  • 2021-06-23
  • 2022-12-23
  • 2021-09-16
  • 2021-11-25
相关资源
相似解决方案