nslookup is used to query a dns server that works on both linux and windows servers which gives us information we need about a name server if it is authorative or not and a particular record if you wish so. in linux if you do not have that command by default install bind-utils package.
A common scenario that nslookup is pactical is when you have set a new ns on your domain or changed its name servers. now we know that almost all servers in internet have ttl of 4 to 24 hours, meaning it will take this period for changes to take place.
but once you are sure your domain status is active and not in client/server hold and this amount of time has passed then you need to check your name server and see if it responds to your requests:
if you receive a query refused it means either your name server is out and not working properly or your domain address does not exist in its zones.
nslookup server address_of_ns domain
another practical command is when you are looking to see if a particular record exists in ns let’s say you wanna know if mx record is generated for your mail server to troubleshoot that.
nslookup server test.com set type = mx domain name