Terminal Dojo
Help العربية Sign inGet started

Command library / host

host

BashDraft — pending expert review3 practice missions

Simple DNS lookups

The simplest DNS tool: give it a name and it prints the addresses and mail servers behind it; give it an IP address and it does the reverse lookup. Where dig shows the whole DNS response for debugging, host prints just the answer, in plain sentences.

Practice host

Usage

host [-t TYPE] name [server]

Options and flags

Examples

Common mistakes

host -t example.net MX host -t MX example.net

-t takes the record type right after it; here it would ask for a record type called example.net.

Related commands

nslookupdigwhois