Linux / UNIX: DNS Lookup Command

The nslookup command is a tool for performing DNS lookups in Linux and UNIX systems. This command allows you to query a DNS server for information about a hostname, including its IP address and other information.

Here’s an example of using the nslookup command to perform a DNS lookup for the hostname www.google.com:

nslookup www.google.com

This will return information about the hostname, including its IP address, as well as information about the DNS server used to perform the lookup.

You can also specify a specific DNS server to use for the lookup by using the -server option:

nslookup -server 8.8.8.8 www.google.com

In this example, the Google public DNS server (8.8.8.8) is used for the lookup.

Note that the nslookup command is being deprecated in favor of other DNS lookup tools, such as dig and host, which provide more features and better performance.

Leave a Comment