Closed Captioning Closed captioning available on our YouTube channel

How to use the nslookup command: 2-Minute Linux Tip

Network World | May 23, 2019

In this Linux tip, learn how to use the nslookup command. This command provides information on naming services and demonstrates how your system looks up hostnames prior to connecting to them.

Copyright © 2019 IDG Communications, Inc.

Hi, this is Sandra Henry-Stocker, author of the “Unix as a Second Language” blog on NetworkWorld.
In this Linux tip, we’re going to look at the nslookup command. nslookup will provide information on naming services and demonstrate how your system looks up hostnames prior to connecting to them.
It works with the name server that your system is configured to use as defined in the /etc/resolv.conf file. Let’s check it out …
In this response to this command, we see a lot of information:

A “non-authoritative answer” simply means that the name server you are communicating with has received this information from another name server. It is non-authoritative because it isn’t the source for this information.
You can also use nslookup to do what is called a “reverse lookup”. In other words, you start with an IP address and ask what system it belongs to. Let’s check the IP address we got in our earlier nslookup command:

Note that the bytes in the IP address are in reverse order. =>
To quit nslookup, type “exit”.
You can also use nslookup in a line-by-line mode. Provide an argument, get an answer and you’re back at the command prompt:
$ nslookup
That’s your Linux tip for today.
If you have questions or would like to suggest a topic, please add a comment below.
And don’t forget to subscribe to the IDG Tech(talk) channel on YouTube.
If you liked this video, please hit the like and share buttons. For more Linux tips, be sure to follow us on Facebook, YouTube and
Featured videos from