中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

Ubuntu中如何編輯resolv.conf文件

小樊
83
2024-08-08 19:52:39
欄目: 智能運維

  1. 打開終端,輸入以下命令打開resolv.conf文件:
sudo nano /etc/resolv.conf
  1. 在打開的文件中,可以編輯nameserver行添加DNS服務器的IP地址,例如:
nameserver 8.8.8.8
nameserver 8.8.4.4
  1. 按下Ctrl + O保存文件,然后按下Ctrl + X退出編輯器。

  2. 如果想要禁止系統更新resolv.conf文件,可以編輯/etc/resolv.conf.head文件,輸入以下內容:

# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "systemd-resolve --status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs should typically not access this file directly, but
# only through the symlink at /etc/resolv.conf. To manage resolv.conf(5)
# in a different way, replace this symlink by a static file or a different
# symlink.
#
# See systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53
  1. 按下Ctrl + O保存文件,然后按下Ctrl + X退出編輯器。

  2. 重啟網絡服務以使更改生效:

sudo systemctl restart systemd-resolved.service

0
额敏县| 济宁市| 玉山县| 余干县| 孟津县| 九江县| 肃南| 阿尔山市| 蓬溪县| 孙吴县| 临夏市| 白玉县| 凌源市| 太谷县| 随州市| 沽源县| 宜丰县| 柳州市| 卢龙县| 内黄县| 独山县| 锦屏县| 临桂县| 会宁县| 四平市| 望江县| 新巴尔虎右旗| 余江县| 额尔古纳市| 锡林郭勒盟| 朔州市| 石楼县| 台南市| 普格县| 安义县| 拜泉县| 镇雄县| 邵武市| 班戈县| 娄烦县| 仙桃市|