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
| Name | Type | Description |
|---|---|---|
| NAME | operand | Query name |
| SERVER | operand | Optional DNS server |
| -t | option | Type |
| -W | option | Wait 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