How to install nslookup, dig, host commands in Linux

That can’t do moment we face when we are trying to check if the website is pointing to correct IP and the nameservers which are authoritative for our servers are added correctly at the registrar end. A newly installed machine will not have dig, nslookup, host commands. So we have to manually install them on our servers. All these commands are included in a package called “bind-utils”. But different OS have different package names. I will be doing everything as root user, if you don’t have root privileges then you just have to add sudo before every command.

Installing is pretty straight process by the way.
My ubuntu sources list

[email protected]:~# cat /etc/apt/sources.list
deb lucid main
deb lucid-updates main
deb lucid-security main
deb lucid universe
deb lucid-updates universe

In ubuntu systems it is “dnsutils”


[email protected]:~# apt-get update
[email protected]:~# apt-get install dnsutils -y

In RHEL/Centos it will be bind-utils

[email protected]:~# yum install bind-utils