Linux 网络
附1:DNS文件缺失
- 重新启动网络管理服务,让系统重新生成resolv.conf:
sudo service network-manager restart
- 重启network-manager未生效,尝试:
# 重启resolvconf服务:
sudo service resolvconf restart
# 编辑/etc/resolvconf/resolv.conf.d/base文件,添加nameserver:
vim /etc/resolvconf/resolv.conf.d/base
> nameserver 8.8.8.8
# 然后重新生成resolv.conf:
sudo resolvconf -u
- 检查DNS设置
# 检查/etc/network/interfaces文件中的DNS设置。
cat /etc/network/interfaces
# nameserver 8.8.8.8