Wednesday, June 5, 2024

Quick reference on NSLOOKUP CLI tool in command Prompt or Terminal

 How Do I Use The NSLOOKUP Tool In The Command Prompt Or Terminal?

Microsoft Windows includes a tool called NSLOOKUP that you can use via the command prompt. This tool can be used to check DNS records propagation and resolution using different servers and perform other troubleshooting steps.

  1. Open Command prompt. Read the Knowledge Base article What Is A Command Prompt? for instructions on how to do it.
  2. Type nslookup and hit Enter. The displayed information will be your local DNS server and its IP address. You can specify the DNS server (IP address), type of record, and domain name.

    Note: all the screenshots below are for Windows OS but the same commands will work in Terminal for Mac.

    nslookup

  3. Type nslookup domain_name and the command will return the A record for the domain you ran a query for.

    A record

  4. Type nslookup -q=XX domain_name where XX is a type of a DNS record and domain_name is the domain you want to look up the record for. Some of the available types of records are MXACNAME, and TXT. The records are then displayed.

    Image 4

  5. To look up the specific type of record for a domain use the nslookup -type=record_type domain_name where record_type is A, CNAME, MX, PTR, NS, ANY and domain_name is the domain you want to look up the record for.
    Example: Type nslookup -type=ns domain_name where domain_name is the domain for your query and hit Enter. The tool will display the name servers for the domain you specified.

    Example 3

Notes:

  • If you type help or you will see the list of all commands.
  • By pressing the Up and Down arrows you can select previously entered commands.

No comments:

Post a Comment