LIVE NEWSROOM · --:-- · May 15, 2026
A LIBRARY FOR SECURITY RESEARCHERS

What is nslookup command in Linux

Post on X LinkedIn
What is nslookup command in Linux

Hello guys, in this article I will explain how and why we should use the nslookup tool. It is a command-line tool that is used to diagnose and troubleshoot DNS (Domain Name System) related issues.

With the help of this article, you can learn how to use nslookup with examples and why we use it. So, let’s start:

// 01 what is nslookup

It is a command-line utility that allows you to perform DNS queries to find information about a particular domain name or IP address. It is commonly used to troubleshoot DNS issues, as it can provide information about the DNS records for a given domain, including the IP address and DNS server used for that domain.

To use it, you must enter the name or IP address of the domain you want to look up, followed by the name of the server you want to use. For example, if you want to look up the IP address for testme.com and use the DNS server at 8.8.8.8, you would type the following command:

nslookup example.com 8.8.8.8

// 02 Its command is used for

  1. To find the IP address of any domain.
  2. To find domain server details.
  3. To find mail server details.
  4. To find the class of any domain.
  5. To find detailed information about DNS and response.

Find the IP address of any domain

Syntax:-

nslookup <DOMAIN NAME>

Example:-

nslookup testme.com 

Output:-

nslookup test

Find name server from DNS command

Syntax:-

nslookup -type=ns <DOMAIN NAME>

Example:-

nslookup -type=ns  testme.com

Output:-

name server

Find mail records

Syntax:-

nslookup -type=mx <DOMAIN NAME>

Example:-

nslookup -type=mx testme.com

Output:-

mail records

Find the class of any domain

Syntax:-

nslookup -class=IN <DOMAIN NAME>

Example:-

nslookup -class=IN  testme.com

Output:-

find class domain

Find detailed information about DNS and response

Syntax:-

nslookup -debug <DOMAIN NAME>

Example:-

nslookup -debug testme.com

Output:-

detail information of DNS

// 03 Why do we use it

  1. It allows users to query DNS records and retrieve information about domain names and IP addresses.
  2. It provides a user-friendly interface for users to perform DNS queries without having to use complex command line commands.
  3. It allows users to troubleshoot DNS issues and identify potential problems with DNS configuration.
  4. It allows users to view detailed information about DNS records, including their type, data, and expiration date.
  5. It allows users to perform recursive DNS queries, which can help identify issues with DNS servers and the DNS resolution process.
  6. It allows users to query multiple DNS servers at once, which can be useful for testing DNS configuration and identifying potential DNS issues.
  7. It provides detailed error messages and diagnostic information, which can help users identify and resolve DNS issues more quickly and efficiently.
  8. It is a free and open-source tool that is available on most operating systems, making it widely accessible to users.

keywords:- nslookup, nslookup command, what is nslookup, nslookup command, command for nslookup.

    TE
    Team Ciphers Security

    Independent cybersecurity desk publishing daily threat intel and research since 2021. Practitioners writing for analysts, defenders, and learners. About us →

    Previous How to install knockpy on Linux for information gathering Next Best Information Gathering Tools

    Latest News

    YARA-X 1.16.0: Faster Scans, Panic Fixes, and Neovim LSP Support YARA-X 1.16.0 ships with performance improvements across 10 PRs, constant folding for bitwise ops, configurable mat… Instructure Removed from ShinyHunters' Leak Site as Canvas Breach Deadline Passes Instructure was quietly removed from ShinyHunters' extortion site after the May 12, 2026 deadline — no data dump, n… Costa Rica Joins Have I Been Pwned as the 42nd Government Costa Rica's CSIRT gains free access to Have I Been Pwned's government domain monitoring service, becoming the 42nd… LummaC2 Infostealer Targets US Critical Infrastructure: CISA-FBI Advisory AA25-141B and DOJ Domain Seizures CISA and FBI advisory AA25-141B details LummaC2 MaaS infostealer TTPs targeting critical infrastructure. DOJ seized… MacSync Stealer: Hackers Abuse Google Ads and Claude.ai Chats to Push Mac Malware Russian-speaking attackers combine Google Ads and Claude.ai shared chats in a ClickFix campaign deploying MacSync S… JDownloader Site Hacked, Installers Swapped with Python RAT Malware JDownloader's website was hacked May 6–7, 2026, replacing Windows and Linux installers with a Python-based RAT. Use… Operation HookedWing: 4-Year Phishing Campaign Hits 500+ Organizations Across Aviation, Energy, and Logistics Operation HookedWing has stolen credentials from 500+ organizations in aviation, energy, logistics, and critical in… Twelve Critical vm2 Node.js Vulnerabilities Enable Sandbox Escape and Arbitrary Code Execution A dozen CVEs in the vm2 Node.js sandbox library — including CVSS 10.0 flaws — allow sandbox escape and RCE. Update …
    Scroll to Top