Table of Contents
Introduction
In this tutorial, How to install
To install nslookup
on Linux, you need to install the dnsutils
package, which contains the nslookup utility. The process for installing the package can vary depending on the Linux distribution you are using. Here are the commands for some popular distributions:
How to Install nslookup on Linux

Install nslookup for Centos
[vagrant@DevopsRoles ~]$ sudo yum install bind-utils

Install nslookup for Ubuntu
Use apt-cache to search the package for nslookup command.
[vagrant@DevopsRoles ~]$ apt-cache search nslookup
The result found 2 packages that are related to nslookup.
dnsutils - Clients provided with BIND
libnet-nslookup-perl - simple DNS lookup module for perl
so install nslookup
[vagrant@DevopsRoles ~]$ sudo apt-get install dnsutils
Once the installation is complete, you can use nslookup
from the command line.
[vagrant@DevopsRoles ~]$ nslookup x.x.x.x
Conclusion
In this guide, we have covered how to install and use the nslookup
command on Linux, specifically for CentOS and Ubuntu. Whether you’re troubleshooting DNS issues or simply querying domain name records, nslookup
is a powerful and essential tool for network administrators and IT professionals.
By following the simple installation steps, you can quickly enable nslookup
on your system and start resolving domain names with ease. If you encounter any issues, ensure that your system’s package manager is up to date and that you have the necessary permissions to install packages.
We hope this guide has been helpful! If you have any questions or need further assistance, feel free to leave a comment or check out our other Linux tutorials. Thank you for reading theΒ DevopsRolesΒ page!
Thanks, this was very helpful.
you’re welcome! π