We often check the DNS information of an IP or domain name at work to see which machine the current IP is bound to, or if the current domain name resolves properly. This is where the nslookup command comes into play.
The nslookup command is mainly used to query the DNS information of a domain name. nslookup has two working modes: “interactive mode” and “non-interactive mode”. Enter nslookup directly in the command line, and you will enter the interactive mode without entering any parameters.
Full spelling of the command
nslookup = query Internet name server interactively
- set type=a: Set query domain name A record.
- set type=mx: set query domain mail exchange record.
in non-interactive mode to query the basic information of the domain name.
Enter the interactive mode to query the domain name information.
Before using nslookup, make sure you have it installed. nslookup is a command in the bind-utils package.