How to change DNS on Linux
1 min read
Temporarily change DNS on Linux
- Edit the file
/etc/resolv.conf
with your favourite text editor:
- Add the following lines to the file:
Permanently change DNS on linux
- Become root:
- Edit
/etc/NetworkManager/system-connections/<connection_name>
with your favourite text editor:
- Add (change) the following line under the
[ipv4]
section:
-
Save and exit
-
Exit root:
- Restart the network manager:
References: