Bind-utils package is very helpful and it’s a collection of client side program includes the packages are nslookup, host and dig. If you execute these commands and getting below errors:
# dig centos.org
-bash: dig: command not found
# host redhat.com
-bash: host: command not found
#nslookup Ubuntu.com
-bash: nslookup: command not found
-bash: dig: command not found
# host redhat.com
-bash: host: command not found
#nslookup Ubuntu.com
-bash: nslookup: command not found
This error indicates to the bind-utils package not installed during Operating System installation. You need to install bind-utils package using yum command like below,
# yum install bind-utils
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
…
--> Running transaction check
---> Package bind-utils.x86_64 32:9.8.2-0.23.rc1.el6_5.1 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
========================================================
Package Arch Version Repository Size
========================================================
Installing: bind-utils x86_64 32:9.8.2-0.23.rc1.el6_5.1 182 k
Transaction Summary
========================================================
Install 1 Package(s)
Total download size: 182 k
Installed size: 438 k
Is this ok [y/N]: y
Downloading Packages:
bind-utils-9.8.2-0.23.rc1.el6_5.1.x86_64.rpm | 182 kB 00:00
...
Running Transaction
Installing : 32:bind-utils-9.8.2-0.23.rc1.el6_5.1.x86_64 1/1
Verifying : 32:bind-utils-9.8.2-0.23.rc1.el6_5.1.x86_64 1/1
Installed:
bind-utils.x86_64 32:9.8.2-0.23.rc1.el6_5.1
Complete!
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
…
--> Running transaction check
---> Package bind-utils.x86_64 32:9.8.2-0.23.rc1.el6_5.1 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
========================================================
Package Arch Version Repository Size
========================================================
Installing: bind-utils x86_64 32:9.8.2-0.23.rc1.el6_5.1 182 k
Transaction Summary
========================================================
Install 1 Package(s)
Total download size: 182 k
Installed size: 438 k
Is this ok [y/N]: y
Downloading Packages:
bind-utils-9.8.2-0.23.rc1.el6_5.1.x86_64.rpm | 182 kB 00:00
...
Running Transaction
Installing : 32:bind-utils-9.8.2-0.23.rc1.el6_5.1.x86_64 1/1
Verifying : 32:bind-utils-9.8.2-0.23.rc1.el6_5.1.x86_64 1/1
Installed:
bind-utils.x86_64 32:9.8.2-0.23.rc1.el6_5.1
Complete!
Once installation has been finished, you can apply these commands again.
DIG :
Domain Information Groper (DIG) is a Flexible tool to interact with the DNS Name server and its clearly generate domain outputs.
# dig domain.com
; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.23.rc1.el6_5.1 <<>> thelinuxfaq.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 5327
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 0
;; QUESTION SECTION:
; Domain.com. IN A
;; ANSWER SECTION:
Domain.com. 3517 IN A 192.168.0.1
;; AUTHORITY SECTION:
Domain.com.com. 86317 IN NS ns1.domain.com.
Domain.com.com. 86317 IN NS ns2.domain.com.
;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Jun 3 23:05:44 2014
;; MSG SIZE rcvd: 96
; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.23.rc1.el6_5.1 <<>> thelinuxfaq.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 5327
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 0
;; QUESTION SECTION:
; Domain.com. IN A
;; ANSWER SECTION:
Domain.com. 3517 IN A 192.168.0.1
;; AUTHORITY SECTION:
Domain.com.com. 86317 IN NS ns1.domain.com.
Domain.com.com. 86317 IN NS ns2.domain.com.
;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Jun 3 23:05:44 2014
;; MSG SIZE rcvd: 96
NSLOOKUP:
Nslookup is a program to query Internet domain name servers.
# nslookup Domain.com
Server: 127.0.0.1
Address: 127.0.0.1#53
Non-authoritative answer:
Name: Domain.com
Address: 192.168.0.1
Server: 127.0.0.1
Address: 127.0.0.1#53
Non-authoritative answer:
Name: Domain.com
Address: 192.168.0.1
HOST :
Host is a useful utility for getting DNS lookups used to convert names to IP addresses and vice versa. For example,
# host domain.com
domain has address 192.168.0.1
domain mail is handled by 0 Domain.com.
(Or)
# host -a domain.com
Trying "domain.com"
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 27770
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 2, ADDITIONAL: 3
;; QUESTION SECTION:
;domain.com. IN ANY
;; ANSWER SECTION:
domain.com. 14386 IN MX 0 domain.
domain.com. 14385 IN A 192.168.0.1
domain.com. 86385 IN NS ns1.domain.com.
domain.com. 86385 IN NS ns2.domain.com.
;; AUTHORITY SECTION:
domain.com. 86385 IN NS ns2.domain.com.
domain.com. 86385 IN NS ns1.domain.com.
;; ADDITIONAL SECTION:
domain. 14385 IN A 192.168.0.1
ns2.domain.com. 172785 IN A 192.168.0.1
ns1.domain.com. 172785 IN A 192.168.0.1
Received 182 bytes from 127.0.0.1#53 in 1 ms
domain has address 192.168.0.1
domain mail is handled by 0 Domain.com.
(Or)
# host -a domain.com
Trying "domain.com"
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 27770
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 2, ADDITIONAL: 3
;; QUESTION SECTION:
;domain.com. IN ANY
;; ANSWER SECTION:
domain.com. 14386 IN MX 0 domain.
domain.com. 14385 IN A 192.168.0.1
domain.com. 86385 IN NS ns1.domain.com.
domain.com. 86385 IN NS ns2.domain.com.
;; AUTHORITY SECTION:
domain.com. 86385 IN NS ns2.domain.com.
domain.com. 86385 IN NS ns1.domain.com.
;; ADDITIONAL SECTION:
domain. 14385 IN A 192.168.0.1
ns2.domain.com. 172785 IN A 192.168.0.1
ns1.domain.com. 172785 IN A 192.168.0.1
Received 182 bytes from 127.0.0.1#53 in 1 ms
Comments (0)