commands
dig — Query DNS records
BIND DNS query client. +time and +tries bound queries; +short reduces output but omits important status details. The example requires a configured local DNS test service. Use a fresh private workspace; live operations are VM-only.
Formal Syntax & Structure
linux syntaxlinux
dig @SERVER NAME [TYPE] [OPTIONS]Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| SERVER | operand | DNS server |
| NAME | operand | Query name |
| TYPE | operand | Record type |
| +time | operand | Query timeout |
| +tries | operand | Attempt count |
Return Value
exit status and output
BIND DNS query client. +time and +tries bound queries; +short reduces output but omits important status details. The example requires a configured local DNS test service.
Working Example
Example Snippetlinux
dig @127.0.0.1 app.example A +time=1 +tries=1