← 返回命令列表

Linux command

dog 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Query A records

dog [example.com]

Query specific record

dog [example.com] [MX]

Use specific DNS

dog [example.com] @[8.8.8.8]

Query multiple record

dog [example.com] A AAAA MX

Output in JSON

dog [example.com] --json

Use DNS over

dog [example.com] --https @[https://cloudflare-dns.com/dns-query]

Use DNS over

dog [example.com] --tls @[dns.google]

说明

dog is a command-line DNS client with colorful output and modern features. It serves as an alternative to dig with a more user-friendly interface and support for encrypted DNS protocols. The tool supports DNS over HTTPS (DoH) and DNS over TLS (DoT), enabling secure DNS queries. Output is colorized by default for readability, with JSON output available for scripting. dog provides a simplified interface compared to dig while maintaining power-user features. Multiple record types can be queried simultaneously, and responses are clearly formatted.

参数

--json, -J
Output as JSON.
--short
Short output format.
--https
Use DNS over HTTPS.
--tls
Use DNS over TLS.
--tcp
Use TCP instead of UDP.
--help
Display help information.

FAQ

What is the dog command used for?

dog is a command-line DNS client with colorful output and modern features. It serves as an alternative to dig with a more user-friendly interface and support for encrypted DNS protocols. The tool supports DNS over HTTPS (DoH) and DNS over TLS (DoT), enabling secure DNS queries. Output is colorized by default for readability, with JSON output available for scripting. dog provides a simplified interface compared to dig while maintaining power-user features. Multiple record types can be queried simultaneously, and responses are clearly formatted.

How do I run a basic dog example?

Run `dog [example.com]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --json, -J do in dog?

Output as JSON.