There’s a lot of different Linux distributions so you’re solution might vary. * Updating DNS in Ubuntu * Updating DNS by editing “/etc/resolv.conf” * Updating DNS by editing “/etc/systemd/resolved.conf”
On the top right of your desktop, open the drop down and select either Wired Settings
or WiFi Settings
.
Next press the gear icon next to the connection.
A window should pop up, nagivate to the IPv4 tab, disable Automatic
in the DNS row and put 8.8.8.8,8.8.4.4
in the text field.
Linux uses the file /etc/resolv.conf
to define the DNS servers it uses. However, this file is often managed by another program on the computer.
View the contents of /etc/resolv.conf
by running cat /etc/resolv.conf
. If you see a warning similar to
do not edit the file. Instead follow Updating DNS by editing “/etc/systemd/resolved.conf”
If you do not see this warning, change the file contents to
nameserver 8.8.8.8
nameserver 8.8.4.4
Systemd is a program on many linux distributions that help manage the operating system. To update the DNS we’ll edit /etc/systemd/resolved.conf
. Find A part in the file that looks like
[Resolve]
DNS=192.168.1.1
FallbackDNS=8.8.8.8
or
[Resolve]
#DNS=
#FallbackDNS=
Change lines DNS=...
and FallbackDNS=...
to be
[Resolve]
DNS=8.8.8.8
FallbackDNS=8.8.4.4
Save the file and run service systemd-resolved restart
.