How to Install and Use Doggo in Linux for Modern Human-Readable DNS Lookups and DoH Resolution

Diagnosing Domain Name System (DNS) propagation, validating SPF and DKIM mail records, and troubleshooting routing issues on Linux servers typically involves traditional tools like dig, nslookup, or host. While dig remains powerful, its monochromatic output is notoriously verbose, packed with technical header flags, and lacks native support for modern encrypted DNS protocols without installing auxiliary proxies.

Doggo is an open-source, modern command-line DNS client written in Go. It presents DNS query results in clean, color-coded tabular formats with human-friendly TTL displays, JSON export capabilities, and out-of-the-box support for encrypted DNS protocols including DNS-over-HTTPS (DoH), DNS-over-TLS (DoT), and DNS-over-QUIC (DoQ). This guide explains how to install, configure, and use Doggo across Linux distributions.

Key Features of Doggo

  • Clean Visual Formatting: Colourised tables showing answer records, record types (A, AAAA, MX, TXT, CNAME), and remaining TTL seconds.
  • Native Encrypted DNS Support: Query Cloudflare, Google, or Quad9 over DoH, DoT, or DoQ with simple protocol prefixes.
  • Multi-Resolver Comparisons: Query multiple DNS resolvers simultaneously to compare propagation times and geo-routing responses.
  • JSON and NDJSON Output: Built-in --json flag allows effortless integration into automated shell scripts and CI/CD pipelines without parsing raw text with awk or sed.

Installing Doggo on Linux

Method 1: Pre-Compiled Binary (Fastest Universal Method)

# Download latest release binary
curl -sS https://raw.githubusercontent.com/mr-karan/doggo/main/godownloader.sh | sh -s -- -b /tmp
sudo mv /tmp/doggo /usr/local/bin/
doggo --version

Method 2: Using Go Install

If you have the Go runtime environment installed:

go install github.com/mr-karan/doggo/cmd/doggo@latest

Method 3: Package Managers (Arch Linux / Homebrew)

# Arch Linux
yay -S doggo-bin

# Homebrew for Linux
brew install doggo

Practical DNS Query Examples

1. Standard Domain Lookup

Query IPv4 address records for a target domain:

doggo example.com

Doggo queries your system’s default resolver (from /etc/resolv.conf) and formats the output into an intuitive table showing Status (NOERROR), query response time (e.g. 14ms), and returned IP addresses.

2. Querying Specific Record Types

Specify record types directly as trailing arguments:

# Query MX mail exchanger records
doggo example.com MX

# Query TXT records (SPF, DKIM, site verification tokens)
doggo example.com TXT

# Query CNAME aliases
doggo api.example.com CNAME

3. Encrypted DNS Resolution (DoH and DoT)

Bypass local ISP DNS hijacking and test secure resolvers using protocol prefixes:

# Query Cloudflare over DNS-over-HTTPS (DoH)
doggo example.com @https://cloudflare-dns.com/dns-query

# Query Quad9 over DNS-over-TLS (DoT)
doggo example.com @tls://dns.quad9.net

# Query Google DNS over HTTPS
doggo example.com @https://dns.google/dns-query

4. Comparing Multiple Resolvers Concurrently

Audit whether a newly created record has propagated across global public resolvers simultaneously:

doggo example.com @1.1.1.1 @8.8.8.8 @9.9.9.9

Doggo fires asynchronous requests to all three resolvers and stacks their output tables side-by-side, allowing you to instantly spot propagation discrepancies.

Doggo Command Syntax and Options Matrix

Command Syntax Target Action Primary Diagnostic Benefit
doggo <domain> Default A and AAAA query Quick IP address resolution using system DNS
doggo <domain> ANY Query all available record types Comprehensive domain configuration audit
doggo -x <IP> Reverse DNS (PTR) lookup Resolves server IP address back to hostname
doggo <domain> --json Structured JSON output Pipes cleanly into jq for scripting and monitoring
doggo <domain> --short Minimal output Prints only IP answers without table borders or headers

Scripting with Doggo and jq

Extract specific IP answers inside automated bash scripts using Doggo’s structured JSON output:

# Extract primary A record IP address directly
IP=$(doggo example.com --json | jq -r '.responses[0].answers[] | select(.type=="A") | .address')
echo "Target server IP is: $IP"

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.