Configure DNS on Linux (Ubuntu/Debian)
Configure custom DNS on Linux distributions like Ubuntu and Debian. We show you both the graphical method with Network Manager and the terminal method editing resolv.conf.
1
GUI Method - Network Manager
Click the network icon in the top bar, select "WiFi Settings" or "Network Settings".
Screenshot: GUI Method - Network Manager
2
Edit Connection
Click the gear icon next to your active connection to edit it.
Screenshot: Edit Connection
3
Configure DNS
Go to the "IPv4" tab, change method to "Manual" and in the DNS field enter: 1.1.1.1, 8.8.8.8
Screenshot: Configure DNS
4
Terminal Method (Alternative)
Edit the resolv.conf file: sudo nano /etc/resolv.conf — Add: nameserver 1.1.1.1 and nameserver 8.8.8.8
Screenshot: Terminal Method (Alternative)
Additional Tips
- Some systems use systemd-resolved; check with "resolvectl status"
- Changes to /etc/resolv.conf may be overwritten on reboot; use NetworkManager for persistent changes
- For servers, consider editing /etc/systemd/resolved.conf
Ready to improve your DNS?
Choose the best free DNS server for your needs and configure it in minutes.