Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

On a Linux system that uses systemd-resolved, start with resolvectl status. It shows DNS servers by interface and can reveal whether a VPN or another link supplies its own resolver. On NetworkManager systems, check nmcli device show. For a quick traditional view, read /etc/resolv.conf; to see the resolver endpoint contacted for one lookup, run dig example.com.

These commands inspect different layers. In particular, 127.0.0.53 in /etc/resolv.conf commonly means applications are talking to a local stub—not that this loopback address is the upstream DNS provider.

First, know which DNS server you mean

“DNS server” can refer to several things:

  • Configured resolver: A DNS address supplied by DHCP, a VPN, NetworkManager, systemd-networkd, or a static setting.
  • Local stub or cache: A local address, such as 127.0.0.53 or 127.0.0.1, that accepts applications’ requests and may forward them elsewhere.
  • Upstream resolver: The remote DNS service that a local stub or cache contacts.
  • Resolver used for one query: The endpoint a particular command or application contacted. Routing rules can make it vary by domain or interface.

These are usually recursive resolvers or forwarding services, not the authoritative DNS server responsible for a domain’s records.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use resolvectl on systemd-resolved systems

resolvectl status

Read the DNS Servers entries under Global and the active links, such as enp3s0 or wlan0. A link may have a different server from the global configuration. The detailed output can also show search or routing domains and whether the resolver is operating in stub mode.

#1 Best Overall
Sale
Cable Matters 10Gbps Snagless Cat 6 Ethernet Cable, 25ft, Black
  • High-Performance Connectivity: This Cat 6 ethernet cable is designed for superior performance, with a 24 AWG copper wire core. It provides universal connectivity as an ethernet cord for LAN network components such as PCs, servers, printers, routers, and more, ensuring reliable and fast network connections
  • Advanced Cat6 Technology: Experience Cat6 performance with higher bandwidth at a Cat5e price. This network cable is future-proof, ready for 10-Gigabit Ethernet and backwards compatible with any existing Cat 5 cable network. It meets or exceeds Category 6 performance according to the TIA/EIA 568-C.2 standard
  • Reliable Wired Network Solution: Known variously as a Cat6 network cable, ethernet cable Cat 6, or Cat 6 data/LAN cable, this RJ45 cable offers a more secure and reliable connection than wireless networks. It's ideal for internet connections that demand consistency and security
  • Durable and Secure Design: The connectors of this ethernet cable feature gold-plated contacts and strain-relief boots for enhanced durability. Bare copper conductors not only improve cable performance but also comply with communication cable specifications
  • High-Speed Data Transfer: With up to 550 MHz bandwidth, this ethernet cord is ideal for server applications, cloud computing, video surveillance, and streaming high-definition video. It also supports Power over Ethernet (PoE, PoE+, PoE++) for powering devices like IP cameras, VoIP phones, and wireless access points, ensuring fast and reliable network performance.

For a shorter list of per-link DNS settings, use:

resolvectl dns

To inspect domain routing and whether a link is treated as a default route for DNS, use:

resolvectl domain
resolvectl default-route

Output varies by systemd version and configuration; some systems do not have a global entry or use different fields. resolvectl is available when the relevant systemd tools are installed, but systemd-resolved is not used by every Linux installation. See the resolvectl manual and the systemd-resolved documentation.

Check NetworkManager’s active DNS settings

If NetworkManager manages the connection, inspect DNS addresses associated with active devices:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
nmcli device show | grep -E 'IP[46].DNS'

Example fields may look like IP4.DNS[1] or IP6.DNS[1]. To inspect one device, substitute its actual name:

nmcli device status
nmcli device show enp3s0

Find active connection profiles with nmcli connection show --active. A profile’s saved DNS values are not necessarily identical to the runtime state, particularly if the connection has not been reactivated or DNS is supplied dynamically. To inspect saved values, replace the profile name below:

Rank #2
Cable Matters 10Gbps Snagless Cat 6 Ethernet Cable, 3ft, Black
  • High-Performance Connectivity: This Cat 6 ethernet cable is designed for superior performance, with a 24 AWG copper wire core. It provides universal connectivity as an ethernet cord for LAN network components such as PCs, servers, printers, routers, and more, ensuring reliable and fast network connections
  • Advanced Cat6 Technology: Experience Cat6 performance with higher bandwidth at a Cat5e price. This network cable is future-proof, ready for 10-Gigabit Ethernet and backwards compatible with any existing Cat 5 cable network. It meets or exceeds Category 6 performance according to the TIA/EIA 568-C.2 standard
  • Reliable Wired Network Solution: Known variously as a Cat6 network cable, ethernet cable Cat 6, or Cat 6 data/LAN cable, this RJ45 cable offers a more secure and reliable connection than wireless networks. It's ideal for internet connections that demand consistency and security
  • Durable and Secure Design: The connectors of this ethernet cable feature gold-plated contacts and strain-relief boots for enhanced durability. Bare copper conductors not only improve cable performance but also comply with communication cable specifications
  • High-Speed Data Transfer: With up to 550 MHz bandwidth, this ethernet cord is ideal for server applications, cloud computing, video surveillance, and streaming high-definition video. It also supports Power over Ethernet (PoE, PoE+, PoE++) for powering devices like IP cameras, VoIP phones, and wireless access points, ensuring fast and reliable network performance.
nmcli connection show "My Wi-Fi"
nmcli -g ipv4.dns,ipv6.dns connection show "My Wi-Fi"

NetworkManager may pass DNS information to systemd-resolved or another DNS plugin rather than placing upstream addresses directly in /etc/resolv.conf. Its connection settings also support priorities and search or routing domains, depending on configuration. See the nmcli manual and NetworkManager connection settings.

Read /etc/resolv.conf

cat /etc/resolv.conf
ls -l /etc/resolv.conf
readlink -f /etc/resolv.conf

This traditional resolver file can contain lines such as nameserver 192.168.1.1, or a local address such as nameserver 127.0.0.53. The latter commonly identifies systemd-resolved’s local stub, not its upstream server. Use resolvectl status to inspect systemd-resolved’s active upstream and per-link information.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The file may be a symlink or a generated file maintained by a network manager, DHCP client, VPN, or local DNS service. Manually editing it may be temporary and overwritten when networking changes. The traditional format has nameserver, search, and options directives, with support for up to three nameserver entries; actual resolver behavior can depend on the implementation and options. See the resolv.conf manual.

See the resolver contacted for one lookup

dig example.com

Look near the end of the output for the SERVER line, for example:

;; SERVER: 127.0.0.53#53(127.0.0.53)

This says that this dig invocation contacted the local stub. It does not reveal which upstream resolver the stub used. For only the returned addresses, dig +short example.com is convenient, but it omits the diagnostic server line.

Rank #3
Jadaol Cat6/Cat6A Ethernet Cable 50FT Flat with Clips 10Gbps Network, White
  • Cat 6 performance at a Cat5e price but with higher bandwidth
  • High Performance Cat6, 30 AWG, RJ45 Ethernet Patch Cable provides universal connectivity for LAN network components such as PCs,computer servers,printers,routers,switch boxes,network media players,NAS,VoIP phones
  • Jadaol cat6 standard cable support Cat8 and Cat7 network and provides performance of up to 250 MHz 10Gbps and is suitable for 10BASE-T, 100BASE-TX (Fast Ethernet), 1000BASE-T/1000BASE-TX (Gigabit Ethernet) and 10GBASE-T (10-Gigabit Ethernet)
  • UTP(Unshielded Twisted Pair) patch cable with RJ45 gold-plated Connectors and are made of 100% bare copper wire, ensure minimal noise and interference
  • The unique flat cable shape allows for a cleaner and safer installation. You can easily and seamlessly make the cable run along walls, follow edges & corners or even make it completely invisible by sliding it under a carpet.

To test a particular resolver directly, specify it with @:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
dig @192.168.1.1 example.com
dig @1.1.1.1 example.com
dig @9.9.9.9 example.com

A successful direct query proves that the chosen server answered that test; it does not prove the system resolver is configured to use that server. To test address families or record types, try dig -4 example.com, dig -6 example.com, dig example.com A, or dig example.com AAAA. The SERVER line identifies the endpoint used by that command, not necessarily the path used by a browser, container, or another application.

If resolvectl or dig is unavailable

Check whether systemd-resolved is active and where the resolver file points:

systemctl is-active systemd-resolved
readlink -f /etc/resolv.conf

If available, nslookup example.com often prints a server and address, while host example.com performs a simple lookup. These tools may not be installed by default and usually provide less diagnostic detail than dig.

To test name resolution through the system’s normal name-service path, use:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
10Gsupxsel Cat 6 Ethernet Cable 3FT 10Pack, Cat6 Ethernet Patch Cable 10Gbps, High-Speed UTP Cat6 Network Cable Pure Copper, Cat 6 Cable for Home and Office Network, Black
  • High Performance : Cat 6 ethernet cable support up to 10 Gbps and 550 Mhz application. Cat6 patch cable are made of 26 AWG pure copper with reliable performance. Ethernet cables compliant with ANSI TIA 568.2 D standard.
  • Clean Up Home network: Cat6 short patch cable is perfect to connect patch panel to switch, clean up your network rack with the cables all be the same and save hours of time to make your own patch cable.
  • Widely Compatible : Cat6 ethernet cable are widely use in data center application. Ethernet patch cable connect patch panels to switch and other various devices. Cat6 cable also used for homenetwork such as router, computer, tv and server.
  • Easy Unplug Design: Cat6 ethernet cord with snagless plug protects plugs when routing through cable managers or pathways. Cat 6 patch cable are easy plug and unplug from ports.
  • Support POE POE+:Cat 6 ethernet cables are made of pure copper conductors. Cat 6 cable supports IEEE802.3at and IEEE802.3af protocol poe power supply.
getent hosts example.com

This checks the configured Name Service Switch path, which can use sources such as /etc/hosts as well as DNS. It does not necessarily identify a DNS server or prove that the answer came from DNS.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

When interfaces, VPNs, or split DNS are involved

With Wi-Fi and Ethernet active together, a VPN, or virtual interfaces, there may be no single resolver that handles every name. A VPN can install a DNS server and search domain, or route only selected domains through its resolver. A routing domain such as ~corp.example indicates domain-specific routing; it does not mean all queries go to that server.

Check active links, domains, and NetworkManager connections together:

resolvectl status
resolvectl domain
resolvectl default-route
nmcli device status
nmcli connection show --active

For a particular interface, first identify its name with ip link or nmcli device status, then run:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
resolvectl dns enp3s0
nmcli device show enp3s0 | grep -E 'IP[46].DNS'

Replace enp3s0 with the interface you are investigating. IPv4 and IPv6 may have different DNS servers. A result from one interface does not establish which resolver handled a domain routed over another link.

Best Value
Sale
Cable Matters 10Gbps 5-Pack Snagless Cat 6 Ethernet Cable, 6ft, Black
  • High-Performance Connectivity: This Cat 6 ethernet cable is designed for superior performance, with a 24 AWG copper wire core. It provides universal connectivity as an ethernet cord for LAN network components such as PCs, servers, printers, routers, and more, ensuring reliable and fast network connections
  • Advanced Cat6 Technology: Experience Cat6 performance with higher bandwidth at a Cat5e price. This network cable is future-proof, ready for 10-Gigabit Ethernet and backwards compatible with any existing Cat 5 cable network. It meets or exceeds Category 6 performance according to the TIA/EIA 568-C.2 standard
  • Reliable Wired Network Solution: Known variously as a Cat6 network cable, ethernet cable Cat 6, or Cat 6 data/LAN cable, this RJ45 cable offers a more secure and reliable connection than wireless networks. It's ideal for internet connections that demand consistency and security
  • Durable and Secure Design: The connectors of this ethernet cable feature gold-plated contacts and strain-relief boots for enhanced durability. Bare copper conductors not only improve cable performance but also comply with communication cable specifications
  • High-Speed Data Transfer: With up to 550 MHz bandwidth, this ethernet cord is ideal for server applications, cloud computing, video surveillance, and streaming high-definition video. It also supports Power over Ethernet (PoE, PoE+, PoE++) for powering devices like IP cameras, VoIP phones, and wireless access points, ensuring fast and reliable network performance.

Why DNS commands can disagree

Different results are not automatically a configuration error. They may describe different layers:

  • /etc/resolv.conf shows the file-based resolver endpoint presented to traditional clients.
  • resolvectl shows systemd-resolved’s active configuration, including per-link settings.
  • nmcli device show reports device state known to NetworkManager; nmcli connection show can show saved profile values.
  • dig identifies the endpoint that particular command contacted.
  • getent tests the system name-service path, which may not rely exclusively on DNS.

Local services such as dnsmasq, Unbound, Pi-hole, or a corporate agent can also listen locally and forward queries upstream. A local address alone does not disclose the forwarding destination.

A practical troubleshooting sequence

  1. Check the active resolver configuration: run resolvectl status if available; check NetworkManager with nmcli device show.
  2. Identify the resolver file and its target: run cat /etc/resolv.conf and readlink -f /etc/resolv.conf.
  3. Test ordinary system resolution: run getent hosts example.com.
  4. See what a DNS query contacts: run dig example.com and inspect SERVER.
  5. Compare a specific upstream: run dig @SERVER example.com, substituting the DNS address you want to test.
  6. Check local listeners if a loopback address appears: run ss -lntup | grep ':53'. A TCP check alone is not a complete DNS test: ordinary DNS commonly uses UDP and may fall back to TCP.

If the commands are being run inside a container or virtual machine, they describe that environment’s resolver configuration, not necessarily the host’s. Run the checks in the same network namespace as the application with the problem.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Finally, separate DNS from basic connectivity. A successful connection to an IP does not prove that name resolution works; a failed ping can also reflect firewall rules or a host that blocks ICMP. A successful lookup only confirms that particular query under those conditions.

Choose the command for your question

What you want to know Command
Active resolver and per-link DNS on systemd-resolved resolvectl status
Configured DNS addresses by link resolvectl dns
DNS associated with NetworkManager devices nmcli device show
Traditional file-based resolver endpoint cat /etc/resolv.conf
Endpoint contacted for one lookup dig example.com
Test a specified resolver directly dig @SERVER example.com
Test normal system name resolution getent hosts example.com
Investigate VPN or split-DNS routing resolvectl status and resolvectl domain

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.