Insight: Beginner’s Guide To nslookup Command: 10 Practical Examples
nslookup is a popular command-line network tool for querying the Domain Name System to obtain domain name or IP address, or other DNS records. nslookup or name server lookup is used to lookup and find IP address information of computers in the internet.
In this tutorial post, we are going to show you the some basic examples of nslookup command. If you are beginner level of users and want to know about nslookup then this post is for you.
Beginner’s Guide To nslookup Command: 7 Practical Examples
Let’s get started:
1. IP address of website:
You can run nslookup command to know the details of IP address of specific website. Run the following command to know the IP address of website using nslookup command in Linux.
nslookup omgfoss.com Output: Server: 127.0.0.53 Address: 127.0.0.53#53 Non-authoritative answer: Name: omgfoss.com Address: 18.104.22.168 Name: omgfoss.com Address: 22.214.171.124 Name: omgfoss.com Address: 2606:4700:30::681f:5853 Name: omgfoss.com Address: 2606:4700:30::681f:5953
2. Check NS records of website:
Run the following command to check the NS records of the website:
nslookup -type=ns omgfoss.com
3. Query the SOA record of a domain:
Run the following command to get the SOA record of a domain name. SOA or Start of Authority is a type of resource record in the Domain Name System containing administrative information about the zone, especially regarding zone transfers.
nslookup -type=soa omgfoss.com
4. Display MX records:
Run the following command in Linux to display MX records of a domain name:
nslookup -type=mx omgfoss.com
5. Find all of the available DNS records of a domain
Run the following nslookup command to find all of the available DNS records of a domain name:
nslookup -type=any omgfoss.com
6. Reverse DNS lookup:
Run the following command to perform reverse DNS lookup:
7. Check the using of a specific DNS Server:
Run the following command to perform nslookup to check a domain name using specific DNS server:
nslookup example.com ns1.example.com
8. Change the timeout interval for a reply:
Run the following command to change the timeout interval for a reply:
nslookup -timeout=20 omgfoss.com
9. change the port number for the connection.
nslookup -port=56 omgfoss.com
10. Enable debug mode.
nslookup -debug omgfoss.com