• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

host: command not found

by admin

host is a simple tool capable of gathering information and testing name resolution. It is installed on most Linux distributions. host is one of the simplest DNS lookup utilities. If the host command is used without any option, it prints the short summary for its argument DNS lookup.

The example of host command are shown in command line here:

# host www.example.com
# host 8.8.8.8

Syntax

The basic syntax is:

# host {domain name}

The command host {domain name} {IP address} will resolve the domain name against the DNS server specified by the IP address.

If you encounter the below error while running the host command:

host: command not found

you may try installing the below package as per your choice of distribution:

OS Distribution Command
Debian apt-get install bind9-host
Ubuntu apt-get install bind9-host
Arch Linux pacman -S bind9-host
Kali Linux apt-get install bind9-host
CentOS yum install bind9-host
Fedora dnf install bind9-host
Raspbian apt-get install bind9-host

host Command Examples

1. Lookup A, AAAA, and MX records of a domain:

# host domain

2. Lookup a field (CNAME, TXT,…) of a domain:

# host -t field domain

3. Reverse lookup an IP:

# host ip_address

4. Specify an alternate DNS server to query:

# host domain 8.8.8.8

Filed Under: Linux

Some more articles you might also be interested in …

  1. sar Command Examples in Linux
  2. arduino: Arduino Studio – Integrated Development Environment for the Arduino platform
  3. makepkg Command Examples in Linux
  4. 3 Ways of Increasing Swap Space on Linux
  5. ln: command not found
  6. How To Force User/Group Ownership Of Files On A Samba Share
  7. addr2line Command Examples in Linux
  8. apparmor_status: command not found
  9. dmenu Command Examples in Linux
  10. minetestserver Command Examples

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright