📜  在 ubuntu 中永久添加 dns - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:50:49.210000             🧑  作者: Mango

代码示例1
sudo apt update
sudo apt install resolvconf

sudo systemctl start resolvconf.service
sudo systemctl enable resolvconf.service
sudo systemctl status resolvconf.service

sudo vim /etc/resolvconf/resolv.conf.d/head
and add the following lines in it:
nameserver 8.8.8.8 
nameserver 8.8.4.4

sudo systemctl start resolvconf.service