On Unix-like operating systems, the host command is a DNS lookup utility, finding the IP address of a domain name. It also performs reverse lookups, finding the domain name associated with an IP address.

This page describes the GNU/Linux version of host.

Description

host performs DNS lookups, converting domain names to IP addresses and vice versa. When no arguments or options are given, host prints a summary of its command line arguments and options.

  • Description
  • Syntax
  • Examples
  • Related commands
  • Linux commands help

In the syntax listed below, name is the domain name that is to be looked up. The name can also be a dotted-decimal IPv4 address or a colon-delimited IPv6 address, where host, by default, performs a reverse lookup for that address. The server is an optional argument that is either the name or IP address of the name server that host should query instead of the server or servers listed in /etc/resolv.conf.

Syntax

host [-aCdlnrsTwv] [-c class] [-N ndots] [-R number] [-t type] [-W wait] [-m flag] [-4] [-6] {name} [server]

Options

Examples

host 204.228.150.3

This command performs a reverse lookup on the IP address 204.228.150.3, which results in the output:

3.150.228.204.in-addr.arpa domain name pointer www.computerhope.com.

dig — DNS lookup utility.nslookup — Query a name server for information about a remote host.ping — Send ICMP ECHO_REQUEST packets to network hosts.