Back to the command reference

host

NetworkBeginner In real Linux

Simple DNS lookup utility

Name: host

This command needs a real Linux system; you can practise it in real Linux mode.

Description

host is a simple DNS lookup tool with concise output: give it a name for the addresses or an IP for the name (reverse lookup).

Syntax

host [OPTION]... NAME [SERVER]

Common options

-t TYPERecord type, e.g. -t MX
-aAll records, with more detail
-W WAITWait at most WAIT seconds
ADDRESSGive an address to look up its name

Examples

  • $ host backup01

    Look up a host’s address

    Explain
  • $ host 127.0.1.10

    Reverse lookup: the name of an IP address

    Explain

Related