nslookup command is a tool used to query domain name DNS (Domain Name System) information. It is commonly used to troubleshoot DNS-related problems, such as incorrect DNS entries or DNS resolution issues.
nslookup command is used to query DNS servers for information about a domain name or IP address. It can be used to retrieve a variety of DNS records, including A, MX, CNAME, TXT, and NS records.
To use the
nslookup command, simply open a terminal and enter the following command:
domain_name with the domain name or IP address you want to query.
To retrieve the IP address of a domain name, enter the following command:
This will return the IP address of the Google website.
To retrieve the MX records for a domain name, enter the following command:
nslookup -query=mx google.com
This will return the MX records for the Google domain.
Specific Use Cases
nslookup command can be used for a variety of purposes, including:
- Troubleshooting DNS-related issues
- Checking DNS records for a domain
- Verifying DNS propagation
- Testing DNS servers
nslookup command has several options that can be used to customize its behavior. The following table lists the available options:
|-query||Specifies the type of DNS record to retrieve (e.g. A, MX, CNAME)|
|-debug||Enables debug mode|
|-timeout||Specifies the timeout value for the query|
|-retry||Specifies the number of retries for the query|
|-type||Specifies the type of DNS record to retrieve (e.g. A, MX, CNAME)|
|-class||Specifies the DNS class to use (e.g. IN, CS, CH, HS)|
If you encounter issues with the
nslookup command, try the following troubleshooting tips:
- Verify that you are using the correct domain name or IP address
- Check your network connectivity
- Verify that your DNS server is configured correctly
- Check for typos in your command syntax
nslookupcommand is available on most Linux distributions.
nslookupcommand is deprecated in favor of the
digcommand, which provides more advanced features and functionality.