How to install the nslookup, host OR dig commands in Linux?

Sometimes you are unable to use the nslookup, host OR dig command on your Linux server and receives the following message

    -bash: nslookup: command not found -bash: host: command not found -bash: dig: command not found

The reason is the package required for the commands to work isn’t installed during the OS installation.

These are all DNS related commands useful to check the DNS report of a domain/IP. You need to install the package bind-utils which offer the commands like nslookup, host, dig and others.

SSH to your server as root and execute

    # yum install bind-utils

Once done, you will be able to use host, nslookup etc

    # host domain.tld domain.tld has address

    # nslookup domain.tld Name:   domain.tld Address:

if (document.currentScript) {