commands

host — Query DNS names

BIND DNS lookup client; -t selects record type and -W sets reply wait. Does not use NSS hosts-file resolution for its DNS lookup. Local DNS fixture required. Use a fresh private workspace; live operations are VM-only.

Formal Syntax & Structure

linux syntaxlinux
host [OPTIONS] NAME [SERVER]

Parameters & Attributes

NameTypeDescription
NAMEoperandQuery name
SERVERoperandOptional DNS server
-toptionType
-WoptionWait seconds

Return Value

exit status and output

BIND DNS lookup client; -t selects record type and -W sets reply wait. Does not use NSS hosts-file resolution for its DNS lookup. Local DNS fixture required.

Working Example

Example Snippetlinux
host -W 1 -t A app.example 127.0.0.1
Linux Reference