TrumanWong

nslookup

Tool for querying domain name DNS information

Supplementary instructions

nslookup command is a commonly used domain name query tool, which is a command used to check DNS information.

nslookup has two working modes, namely "interactive mode" and "non-interactive mode". In "interactive mode", users can query the domain name server for information about various hosts and domain names, or output a list of hosts in the domain name.

In "non-interactive mode", users can only obtain specific names or required information for a host or domain name. At this time, they can also specify the DNS server to query.

Enter the interactive mode and directly enter the nslookup command without any parameters to enter the interactive mode directly. At this time, nslookup will connect to the default domain name server (that is, the first dns address of /etc/resolv.conf). Or enter nslookup -nameserver/ip. To enter non-interactive mode, just enter the nslookup domain name directly.

grammar

nslookup(options)(parameters)(DNS server)

Options

-sil: Do not display any warning message.

Parameters

Domain name: Specify the domain name to be queried.

DNS server

If not filled in, the default domain name server (that is, the first dns address of /etc/resolv.conf) will be used. If the DNS server IP is filled in, nslookup will query the domain name from the domain name server.

Example

[root@localhost ~]# nslookup www.jsdig.com
Server: 202.96.104.15
Address: 202.96.104.15#53

Non-authoritative answer:
www.jsdig.com canonical name = host.1.jsdig.com.
Name: host.1.jsdig.com
Address: 100.42.212.8

[root@localhost ~]# nslookup www.sustech.edu.cn 8.8.8.8
Server: 8.8.8.8
Address: 8.8.8.8#53

Non-authoritative answer:
www.sustech.edu.cn canonical name = www.sustech.edu.cn.w.cdngslb.com.
Name: www.sustech.edu.cn.w.cdngslb.com
Address: 113.96.179.222