Linux basic command-host domain name query tool
Host
Host is a commonly used DNS query tool, which is often used to query domain names and check whether domain name resolution is correct.
The scope of application of this command: RedHat, RHEL, Ubuntu, CentOS, Fedora.
1. Grammar
Host [options] name [server]
2. List of options
Option
Description
-a
Query all the information
-c
Set query type
-C
Query the complete SOA record
-d |-v
Show detailed procedures
-l
List mode
-t
Select query type: CNAME NS SOA SIG KEY AXFR
-w
Wait forever
-W
Set wait timeout
3. Examples
1) query domain name
[root@localhost ~] # host www.baidu.com / / query domain name information, display aliases and ip
Www.baidu.com is an alias for www.a.shifen.com.
Www.a.shifen.com has address 111.13.100.91
Www.a.shifen.com has address 111.13.100.92
2) query all information
[root@localhost ~] # host-a www.baidu.com / / query all the information of the domain name
Trying "www.baidu.com"
;;-> > HEADER