PublicDNS.info Live-tested public DNS
Retested every 72 hours.

Best DNS Settings for Linux

Step-by-step guide to configure DNS on Linux for faster gaming connections and improved reliability.

Updated March 2026

Recommended DNS Servers for Linux Gaming

These servers offer the best balance of speed, reliability, and security for gaming on Linux:

ProviderPrimary DNSSecondary DNSBest for
Cloudflare 1.1.1.1 1.0.0.1 Lowest latency, fastest resolution
Google DNS 8.8.8.8 8.8.4.4 Most reliable, widest compatibility
Quad9 9.9.9.9 149.112.112.112 Security filtering + DNSSEC
Cloudflare Family 1.1.1.3 1.0.0.3 Gaming + malware blocking

How to Change DNS on Linux

Follow these steps to configure custom DNS on your Linux:

  1. Open terminal
    Open your terminal application.
  2. Edit resolv.conf or use NetworkManager
    For NetworkManager: open Settings > Network > your connection > IPv4 tab. For manual setup, edit /etc/resolv.conf.
  3. Set DNS servers
    In NetworkManager, set DNS to Manual and enter 1.1.1.1, 1.0.0.1. For resolv.conf, add: nameserver 1.1.1.1 and nameserver 1.0.0.1.
  4. Disable systemd-resolved (optional)
    If using systemd-resolved, edit /etc/systemd/resolved.conf and set DNS=1.1.1.1 1.0.0.1, then restart the service.
  5. Apply changes
    Restart NetworkManager with: sudo systemctl restart NetworkManager, or reboot.

After changing DNS, test your connection to verify everything works. You may need to restart the device or clear the DNS cache.

Find the Fastest DNS for Your Linux

Which DNS is fastest from your location? Run a real-time benchmark to test 24+ servers and find the best one for your Linux gaming.

Run DNS Benchmark

DNS Setup for Other Platforms

Related Resources

Frequently Asked Questions

What is the best DNS for gaming on Linux?

Cloudflare (1.1.1.1) and Google (8.8.8.8) are the most popular choices for Linux gaming. Cloudflare tends to have slightly lower latency due to its massive anycast network, while Google offers the highest reliability. Run a benchmark from your network to determine which is fastest for you.

Does changing DNS on Linux improve gaming performance?

Changing DNS on Linux primarily improves connection setup times — how quickly you connect to game servers, matchmaking, and download updates. It does not reduce in-game ping once connected, since game traffic uses direct IP connections after the initial DNS resolution.

Can I use DNS-over-HTTPS on Linux?

Linux supports encrypted DNS. You can configure DNS-over-HTTPS or DNS-over-TLS in the system settings for additional privacy. This encrypts your DNS queries from your ISP.

Should I set DNS on my Linux or on my router?

Setting DNS on your router applies the change to all devices on your network, which is simpler to manage. Setting it directly on your Linux overrides the router setting for that device only. For gaming, setting it on the device ensures the DNS is always used, even on other networks.