How to install dig, nslookup, 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

Arunlal Ashok

Linux Server Administrator. I'm managing Linux servers since 2012. I started this blog to share and discuss my ideas. Check My Profile!! in uPwork (oDesk) and let me know if you need any assistance. Thanks!!

You may also like...

2 Responses

  1. Robert says:

    Thanks! I’m using Ubuntu 16.04 and wanted to use the dig command. I used sudo and it installed just fine.

Leave a Reply

Your email address will not be published. Required fields are marked *