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
This indicates that the DNS package “bind-utils” isn’t installed during the OS installation. The ‘bind-utils’ package install nslookup, host, dig and other DNS related commands.
Installation:
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 1.1.1.1
# nslookup domain.tld
Name: domain.tld Address: 1.1.1.1
Comments are closed.