我拿着这个
drwxrwxr-x 3 root tunnel 100 date and time .
drwxr-xr-x 33 root root 860 date and time …
-rwxrwxr-x 1 root tunnel 0 date and time enable-updates
drwxrwxr-x 2 root tunnel 40 date and time interface
-rwxrwxr-x 1 root tunnel 151 date and time resolv.conf然后我跑了
sudo chown --recursive root:tunnel run/resolvconf
sudo chmod --recursive 775 /run/resolvconf那我就明白了
drwxrwxr-x 3 root tunnel 100 date and time .
drwxr-xr-x 33 root root 860 date and time …
-rwxrwxr-x 1 root tunnel 0 date and time enable-updates
drwxrwxr-x 2 root tunnel 40 date and time interface
-rwxrwxr-x 1 root tunnel 151 date and time resolv.conf但是过了几秒钟或重新启动,所有的都是覆盖的标志,文件resolv.conf和我再次得到这个。
ls -al /run/resolvconf
total 4
drwxrwxr-x 3 root tunnel 100 date and time .
drwxr-xr-x 33 root root 860 date and time ..
-rw-r--r-- 1 root root 0 date and time enable-updates
drwxrwxr-x 2 root tunnel 40 date and time interface
-rw-r--r-- 1 root root 151 date and time resolv.conf我不能和你聊天
chattr: Operation not supported while reading flags on /etc/resolv.conf这是resolv.conf的猫
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND – YOUR CHANGES WILL BE OVERWRITTEN发布于 2018-11-23 08:40:54
在编写resolv.conf文件时,每次启动或重新启动网络管理器时都会覆盖该文件
如果您想保持静态DNS,则必须在/etc/network/interfaces文件中添加这一行:
dns-nameservers xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx在我的示例中,您必须将xxxx.xxxx.xxxx.xxxx替换为所需DNS的IP地址。你可以以谷歌的域名系统8.8.8.8和8.8.4.4为例。
致以敬意,
https://unix.stackexchange.com/questions/483619
复制相似问题