Multiple choice technology operating systems

Which command can confirm host name resolution (DNS/BIND) is working correctly?

  1. gethostbyname

  2. hostname

  3. nsquery

  4. whois

Reveal answer Fill a bubble to check yourself
C Correct answer
AI explanation

nsquery (used in some HP-UX/Unix name-service diagnostic toolsets) directly queries the configured name-service resolution order (as set in the name service switch configuration) to confirm that hostname lookups are actually resolving via DNS/BIND the way they're supposed to. Plain hostname just reports the local machine's own name, gethostbyname is a C library call rather than an interactive diagnostic command, and whois queries domain registration data, not DNS/BIND resolution itself.