How to install dig, nslookup, host commands on Linux machine? How to install dig on RHEL 6, RHEL 7, CentOS 6 / CentOS 7 servers? How to install dig, nslookup, host commands on Debian servers? These commands are very important for Linux server administrators, especially the peoples who are working on web hosting field.
These commands are very much useful to lists the DNS zone details of a domain name. Identifying these things are very important in web hosting filed.
A newly installed machine may not have dig, nslookup, host commands by default. 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.
Installation is pretty straight forward process.
My ubuntu sources list
[email protected]:~# 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
How to install dig, nslookup, host commands in Debian based server?
In ubuntu systems it is “dnsutils”
[email protected]:~# apt-get update [email protected]:~# apt-get install dnsutils -y
How to install dig, nslookup, host commands in rpm based machine using YUM?
- How to install it on CentOS 6, CentOS 7, RHEL 6, RHEL 7 etc ?
In RHEL/Centos it will be bind-utils
[email protected]:~# yum install bind-utils
The above commands are quit strait forward and simple to use.
Have a nice DNS lookup!! 🙂