Ubuntu 不断丢失 resolv.conf 设置? [英] Ubuntu keeps losing resolv.conf settings?

查看:51
本文介绍了Ubuntu 不断丢失 resolv.conf 设置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每次我重新启动我的 ubuntu 服务器时,它都会丢失它的名称服务器设置.我必须跑:

Every time I reboot my ubuntu server, it loses it's nameserver setting. I have to run:

echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf 

每次我重新启动以使其再次正常工作.

each time I reboot for it to work properly again.

我尝试直接编辑 resolv.conf,但仍然无法正常工作.

I tried editing resolv.conf directly and still doesn't work properly.

有什么建议吗?

推荐答案

编辑下面的文件,每次重启时生效这是在resolve.conf中添加的resolve conf的头部部分

Edit below file for making effect on every time when you reboot This is head section of resolve conf which added in resolve.conf

/etc/resolvconf/resolv.conf.d/head

/etc/resolvconf/resolv.conf.d/head

这篇关于Ubuntu 不断丢失 resolv.conf 设置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆