๐ŸŽ New User? Get 20% off your first purchase with code NEWUSER20 ยท โšก Instant download ยท ๐Ÿ”’ Secure checkout Register Now โ†’
Menu

Categories

๐ŸŒ Networking August 25, 2026 2

Linux Command: host

DNS lookup utility (simple)

Terminal โ€” Networking
Command
$ host example.com
Output
example.com has address 93.184.216.34\nexample.com has IPv6 address 2606:2800:220:1:248:1893:25c8:1946

host is a simple DNS lookup utility that converts domain names to IP addresses and vice versa. It is simpler and more concise than dig or nslookup for basic DNS queries. host supports all standard DNS record types and can query specific name servers. Its output is clean and human-readable, making it ideal for quick checks and scripts. host is part of the BIND utilities package and is available on most Linux distributions.

Syntax

host [OPTION]... NAME [SERVER]

Key Options

  • domain โ€” Look up A record
  • -t โ€” Specify record type
  • -a โ€” Show all DNS records
  • -v โ€” Verbose output
  • server โ€” Use specific DNS server

Examples

Basic lookup

host example.com

Output: example.com has address 93.184.216.34\nexample.com has IPv6 address 2606:2800:220:1:248:1893:25c8:1946

MX records

host -t MX example.com

Output: example.com mail is handled by 10 mail.example.com

Reverse lookup

host 8.8.8.8

Output: 8.8.8.8.in-addr.arpa domain name pointer dns.google

Pro Tips

  • host gives the cleanest output for quick DNS checks. Use dig for detailed debugging, host for quick answers.
  • Query multiple DNS servers to check propagation: host domain 8.8.8.8, host domain 1.1.1.1.
  • host is part of bind-utils/dnsutils package. Install with: apt install dnsutils or yum install bind-utils.

Learn more: Full host reference โ†’

Share this tip