Show how hostname resolution is ordered.

Section: Name Resolution and Proxy Problems

Inspect NSS host order

bash
bash
grep '^hosts:' /etc/nsswitch.conf
Explanation

Show how hostname resolution is ordered.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Name Resolution and Proxy Problems
Flush systemd-resolved caches
Clear cached DNS results.
OpenIn sheetbashsame section
Show proxy environment variables
Inspect current shell proxy settings.
OpenIn sheetbashsame section
Bypass proxy for one request
Temporarily skip configured proxies for a single cURL request.
OpenIn sheetbashsame section
Show link status with networkctl
Inspect status for a systemd-networkd link.
OpenIn sheetbashsame section
Show systemd-resolved logs
Inspect DNS resolver service logs.
OpenIn sheetbash1 tag match
Time a DNS lookup
Measure how long a DNS query takes.
OpenIn sheetbash1 tag match