[Fix] Nslookup Command Not Found (100% Working)
If your dnsutils & nslookup packages are missing from your system you may encounter the error message ‘nslookup: command not found. Install the packages using install commands according to your operating system.
Nslookup Command Not Found
Nslookup-Name Server Lookup, a network administration tool is widely used as a useful command to get information from the DNS server. Served as a network administration tool for querying the Domain Name System (DNS). It obtains domain name or IP address mapping or any other specific DNS record. Nslookup Command also comes in handy while troubleshooting DNS-related problems.
You may need to use nslookup command on a Debian server (Debian, also known as Debian GNU/Linux), and encounter a problem “nslookup: command not found”. Use apt-get to install dnsutils to solve the issue.
Your error message will look like this if dnsutils & nslookup are not installed while trying a DNS lookup
$ nslookup www.example.com -bash: nslookup: command not found |
To resolve the error, you have to install dnsutils package to lookup the domain:
$ apt-get install dnsutils |
If it works, the output will look like this
$ nslookup www.example.com Server: 6.3.8.8 Address: 8.3.6.8#03 Non-authoritative answer: Name: www.example.com Address: 06.344.26.34 |
Install nslookup in CentOS
Older Linux systems may not have nslookup utilities by default. Newer versions, however, have the function installed by default. If you don’t have Nslookup by default The two come bundled inside the bind-utils package.
Run the following command to install the nslookup in CentOS. The processing tab will look like this:
[root@centos6 ~]# yum install bind-utils Loaded plugins: fastestmirror Determining fastest mirrorsCentOS6.2- Repository | 1.3 kB 00:00 …CentOS6.2- Repository/primary | 1.2 MB 00:00 …CentOS6.2-Repository 3042/3042Setting up Install ProcessResolving Dependencies–> Running transaction check—> Package bind-utils.i686 32:9.7.3-8.P3.el6 will be installed–> Processing Dependency: bind-libs = 32:9.7.3-8.P3.el6 for package: 32:bind-utils-9.7.3-8.P3.el6.i686–> Processing Dependency: liblwres.so.60 for package: 32:bind-utils-9.7.3-8.P3.el6.i686–> Processing Dependency: libisccfg.so.62 for package: 32:bind-utils-9.7.3-8.P3.el6.i686–> Processing Dependency: libisccc.so.60 for package: 32:bind-utils-9.7.3-8.P3.el6.i686–> Processing Dependency: libisc.so.62 for package: 32:bind-utils-9.7.3-8.P3.el6.i686–> Processing Dependency: libdns.so.69 for package: 32:bind-utils-9.7.3-8.P3.el6.i686–> Processing Dependency: libbind9.so.60 for package: 32:bind-utils-9.7.3-8.P3.el6.i686–> Running transaction check—> Package bind-libs.i686 32:9.7.3-8.P3.el6 will be installed–> Finished Dependency ResolutionDependencies Resolved Package Arch Version Repository SizeInstalling: bind-utils i686 32:9.7.3-8.P3.el6 CentOS6.2-Repository 177 kInstalling for dependencies: bind-libs i686 32:9.7.3-8.P3.el6 CentOS6.2-Repository 849 kTransaction SummaryInstall 2 Package(s)Total download size: 1.0 MInstalled size: 2.6 MIs this ok [y/N]: nExiting on user Command[root@centos6 ~]# nslookup-bash: nslookup: command not found[root@centos6 ~]# yum install bind-utilsLoaded plugins: fastestmirrorLoading mirror speeds from cached hostfileSetting up Install ProcessResolving Dependencies–> Running transaction check—> Package bind-utils.i686 32:9.7.3-8.P3.el6 will be installed–> Processing Dependency: bind-libs = 32:9.7.3-8.P3.el6 for package: 32:bind-utils-9.7.3-8.P3.el6.i686–> Processing Dependency: liblwres.so.60 for package: 32:bind-utils-9.7.3-8.P3.el6.i686–> Processing Dependency: libisccfg.so.62 for package: 32:bind-utils-9.7.3-8.P3.el6.i686–> Processing Dependency: libisccc.so.60 for package: 32:bind-utils-9.7.3-8.P3.el6.i686–> Processing Dependency: libisc.so.62 for package: 32:bind-utils-9.7.3-8.P3.el6.i686–> Processing Dependency: libdns.so.69 for package: 32:bind-utils-9.7.3-8.P3.el6.i686–> Processing Dependency: libbind9.so.60 for package: 32:bind-utils-9.7.3-8.P3.el6.i686–> Running transaction check—> Package bind-libs.i686 32:9.7.3-8.P3.el6 will be installed–> Finished Dependency ResolutionDependencies Resolved Package Arch Version Repository SizeInstalling: bind-utils i686 32:9.7.3-8.P3.el6 CentOS6.2-Repository 177 kInstalling for dependencies: bind-libs i686 32:9.7.3-8.P3.el6 CentOS6.2-Repository 849 kTransaction SummaryInstall 2 Package(s)Total download size: 1.0 MInstalled size: 2.6 MIs this ok [y/N]: yDownloading Packages:Total 6.1 MB/s | 1.0 MB 00:00Running rpm_check_debugRunning Transaction TestTransaction Test SucceededRunning Transaction Installing : 32:bind-libs-9.7.3-8.P3.el6.i686 1/2 Installing : 32:bind-utils-9.7.3-8.P3.el6.i686 2/2Installed: bind-utils.i686 32:9.7.3-8.P3.el6Dependency Installed: bind-libs.i686 32:9.7.3-8.P3.el6Complete! |
Install nslookup on Debian / Ubuntu
For Debian and similar derivatives including Debian, install using the apt command.
# apt install dnsutils |
For verifying the installation is completed or not, run the command.
# dig -v |
Install nslookup on ArchLinux
Use the following command to install nslookup for ArchLinux operate
# pacman -Sy dnsutils |
To check the version installed, the command is the same for Debian/Ubuntu
# dig -v |
To Conclude
For missing packages on different Linux distributions use the mentioned commands to install and resolve the error. If the issue persists, contact the technical support of your operating system for further assistance.
Subscribe to our newsletter
& plug into
the world of technology