当我运行时ifconfig -a
,我只得到lo和enp0s10接口,而不是经典的eth0
enp0s10是什么意思?为什么没有eth0?
要在全新的 Kubuntu 19.10 笔记本电脑中配置自定义 DNS 服务器,仅添加以下内容是不够的/etc/systemd/resolved.conf
:
DNS=77.88.8.7 77.88.8.3 #Yandex 的 DNS,即使在 Google 图片上也没有色情内容
我还必须更改符号链接 /etc/resolv.conf
$ ls -l /etc/resolv.conf
lrwxrwxrwx 1 root root 37 oct 26 01:48 /etc/resolv.conf -> /run/systemd/resolve/stub-resolv.conf
$ sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
Run Code Online (Sandbox Code Playgroud)
/run/systemd/resolve/stub-resolv.conf
只有 ISP 给定的 DNS,而自定义 DNS 仅在/run/systemd/resolve/resolv.conf
.
看的时候:
man systemd-resolved.service
Run Code Online (Sandbox Code Playgroud)
它说推荐的文件是/run/systemd/resolve/stub-resolv.conf
,但我不明白它们的区别(可以理解和简单的解释应该是公认的答案)。如果是这样,我如何将系统设置为使用该文件而不是其他文件使用全局配置的 DNS?
注意:在有大量 WiFi 连接的笔记本电脑上,配置每个连接的 DNS 是不可行的,就像许多站点中所建议的那样,这些站点说明了我刚刚描述的如何实现这一点
好奇的补充信息:
/run/systemd/resolve/$ diff stub-resolv.conf resolv.conf
3,8c3,4
< # This is a dynamic resolv.conf file for connecting local clients …
Run Code Online (Sandbox Code Playgroud)