Ubuntu 18.04设置dns

释放双眼,带上耳机,听听看~!

修改服务配置文件:这个服务的配置文件为/etc/systemd/resolved.conf

 

# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See resolved.conf(5) for details

[Resolve]
DNS=8.8.8.8 114.114.114.114
#FallbackDNS=
#Domains=
LLMNR=no
#MulticastDNS=no
#DNSSEC=no
#Cache=yes
#DNSStubListener=yes
~

,然后重启systemd-resolved服务即可。

sudo service systemd-resolved restart

人已赞赏
新媒体

什么是“跨界营销”

2020-9-4 16:22:29

Linux

搭建Git服务器

2019-10-6 16:43:15

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索