Tech Junkie Blog - Real World Tutorials, Happy Coding!: Linux Commands: dig And nslookup Commands

Monday, June 28, 2021

Linux Commands: dig And nslookup Commands

 The dig and nslookup commands are useful commands that you can use to lookup information about a network.  The dig command gives you more information about a network.  For example for my network I have a DNS server setup in it, if I wanted to display the DNS information on my server I would simply type dig and I would get the following:

As you can see it gives you a lot of information about the DNS server like the IP that the server resolves to.  However, there are times when you just want something quick and brief on what the IP resolves to. For example you might know the IP address but not the hostname or vice versa and you want to lookup the information on the part that is know that's when nslookup comes in handy.  For example let's say you know the IP address but you don't know the hostname.  You can lookup the hostname by typing nslookup and you would get the hostname that resolves to the IP address

Or you can lookup the IP address with the hostname by typing nslookup

Obviously you can get more information with the dig command but sometimes it's nice to get less information with the nslookup command.  Although it is deprecated and might not be available for your Linux distribution. So if it's not available use the dig command instead.


  1. Normally I do not read post on blogs, however I wish to say that this write-up very pressured me to check out and do so! Your writing style has been surprised me. Thank you, very great article.

  2. A shelf company, also called a read-made company, is often used in connection with corporate transactions. Shelf companies are established by service providers, but no operational activity takes place in these companies. Instead, they are cared for after training and kept on the shelf until there is a sales opportunity. In this case, service providers can guarantee that no operational activity has taken place in the company and that no debts or other liability can be transferred to the new owner.


Search This Blog