dog, the command-line DNS client

Command-line options

These are the command-line options that dog supports.

Query options

How to specify the query that is being made. These are documented on the Query Options page.

-q, --query=HOST

Host name or IP address to query.

-t, --type=TYPE

Type of the DNS record being queried (A, MX, NS…).

-n, --nameserver=ADDR

Address of the nameserver to send packets to.

--class=CLASS

Network class of the DNS record being queried (IN, CH, HS).

Sending options

Protocol-level changes to the query. These are documented on the Protocol Tweaks page.

--edns=SETTING

Whether to opt in to EDNS.

--txid=NUMBER

Set the transaction ID to a specific value.

-Z=TWEAKS

Set uncommon protocol-level tweaks.

Transport options

Which networking protocol and transport should the request be sent over. These are UDP and TCP, TLS, and HTTPS.

-U, --udp

Use the DNS protocol over UDP.

-T, --tcp

Use the DNS protocol over TCP.

-S, --tls

Use the DNS-over-TLS protocol.

-H, --https

Use the DNS-over-HTTPS protocol.

Output options

How to format the response to the query.

-1, --short

Short mode: display nothing but the first result.

-J, --json

Display the output as JSON.

--color, --colour=WHEN

When to colourise the output.

--seconds

Do not format durations as hours and minutes; instead, display them as seconds.

--time

Print how long the response took to arrive.