Home / Networking Commands / host (Linux)

host

Simple DNS Lookup Utility

What Does It Do?

The host command is a simple utility for performing DNS lookups. It converts domain names to IP addresses and vice versa. It's a lightweight alternative to dig with cleaner, more concise output.

The host command is perfect for quick DNS queries when you don't need the detailed information provided by dig.

Advertisement

[ Insert Google AdSense Banner Code Here ]

When Should I Use It?

Quick DNS Lookups

Fast and simple domain name to IP address resolution.

Reverse Lookups

Convert IP addresses back to domain names.

Check Mail Servers

Query MX records to find mail exchange servers.

View Name Servers

Display authoritative name servers for a domain.

Common Commands

host google.com

Look up the IP address for google.com.

host 8.8.8.8

Reverse lookup for IP address.

host -t MX google.com

Query mail exchange (MX) records.

host -t NS google.com

Query name server (NS) records.

host -a google.com

Query all available DNS records.

host google.com 8.8.8.8

Query using a specific DNS server.

Try It Yourself

Practice using the host command in the terminal below. Try typing host google.com or host -t MX google.com