Solution for Deepin DNS resolution error

weixin_33762321發表於2017-09-09

When I change a wifi or reboot the machine, it will occur DNS resolution error result in connecting to the Network failed. I have tried to change /etc/resolv.conf file,but it was useless. The reason why is that the NetworkManager will change it and override it automatically which makes me crazy.

Solution

sudo vim /etc/resolv.conf
Change the DNS server you want.
After save and quit, you also need to run this command to make sure that it can't be changed.sudo chattr +i /etc/resolv.conf


每次切換wifi,重啟 都會出現DNS解析問題。通過手動修改/etc/resolv.conf 中的nameserver 沒用,NetWorkManager會重新生成該檔案並覆蓋它。這是最他媽賣批騷的。

解決辦法

sudo vim /etc/resolv.conf
在裡面新增要改的DNS伺服器
修改完後加上 sudo chattr +i /etc/resolv.conf 這條命令

相關文章