nslookup: command not found. Install nslookup command on Fedora
How to Install nslookup command on Fedora server
bash: nslookup: command not found
Got the above error on Fedora server. Do the below steps to install nslookup command on Fedora server. nslookup command is provided by bind-utils package.
1. Log into Fedora server as root user
2. Install the package bind-utils using dnf command
#dnf install bind-utils
OR
#sudo dnf install bind-utils
The below dependencies will be installed.
Dependencies resolved.
===================================================================================================
Package Architecture Version Repository Size
===================================================================================================
Installing:
bind-utils x86_64 32:9.11.14-2.fc31 updates 234 k
Installing dependencies:
bind-libs x86_64 32:9.11.14-2.fc31 updates 93 k
bind-libs-lite x86_64 32:9.11.14-2.fc31 updates 1.1 M
bind-license noarch 32:9.11.14-2.fc31 updates 20 k
fstrm x86_64 0.5.0-1.fc31 updates 27 k
libmaxminddb x86_64 1.2.0-8.fc31 fedora 23 k
lmdb-libs x86_64 0.9.24-1.fc31 updates 59 k
protobuf-c x86_64 1.3.1-3.fc31 fedora 35 k
Transaction Summary
===================================================================================================
Install 8 Packages
Total download size: 1.6 M
Installed size: 4.3 M
Is this ok [y/N]: y
Download and install bind-utils rpm
1. Log into fedora server as root user
2. Download bind-utils package from fedoraproject.org using wget command
# wget https://download-ib01.fedoraproject.org/pub/fedora/linux/releases/31/Everything/x86_64/os/Packages/b/bind-utils-9.11.11-1.fc31.x86_64.rpm
3. Install the below dependencies before installing bind-utills
bind-libs
bind-libs-lite
bind-license
fstrm
libmaxminddb
lmdb-libs
protobuf-c
4. Install bind-utils using rpm command
#rpm -ivh bind-utils-9.11.11-1.fc31.x86_64.rpm
nslookup command usage example
# nslookup -type=mx google.com
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
google.com mail exchanger = 10 aspmx.l.google.com.
google.com mail exchanger = 30 alt2.aspmx.l.google.com.
google.com mail exchanger = 50 alt4.aspmx.l.google.com.
google.com mail exchanger = 40 alt3.aspmx.l.google.com.
google.com mail exchanger = 20 alt1.aspmx.l.google.com.