15 Mar

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

root@serversupportz:~# cat /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu lucid main
deb http://archive.ubuntu.com/ubuntu lucid-updates main
deb http://security.ubuntu.com/ubuntu lucid-security main
deb http://archive.ubuntu.com/ubuntu lucid universe
deb http://archive.ubuntu.com/ubuntu lucid-updates universe

In ubuntu systems it is “dnsutils”

 

root@serversupportz:~# apt-get update
root@serversupportz:~# apt-get install dnsutils -y

In RHEL/Centos it will be bind-utils

root@serversupportz:~# yum install bind-utils
Share this

Leave a reply