LIVE NEWSROOM · --:-- · May 26, 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

    PyTorch Lightning PyPI Backdoor: ML Supply Chain Audit and Credential Stealer Detection The PyTorch Lightning PyPI backdoor (versions 2.6.2–2.6.3) deployed a credential stealer targeting AWS keys and bro… Dual Ransomware Gang Attack: When ShinyHunters and Qilin Hit the Same Enterprise ShinyHunters and Qilin separately hit Cushman & Wakefield. Learn why dual ransomware gang attack enterprise in… Adversary-in-the-Middle Phishing MFA Bypass: Detecting the 35,000-User Microsoft 365 Campaign AitM phishing bypassed MFA for 35,000 Microsoft 365 users across 26 countries in 48 hours. Sentinel KQL queries and… Iran UAE Cyberattacks Triple: APT34, Mint Sandstorm, and the Critical Infrastructure Defense Playbook UAE breach attempts tripled to 600K/day after Iran conflict escalation. Map APT34, Mint Sandstorm & MuddyWater… Google GTIG: Chinese-Language PhaaS Ecosystem Rivals Russian Underground in Credential Theft Scale Google's Threat Intelligence Group analyzed a dozen Chinese-language phishing-as-a-service platforms now matching R… Anthropic Mythos Finds 23,000 Vulnerabilities in 1,000 OSS Projects — Patching Bottleneck Grows Anthropic's Mythos AI security scanner has identified over 23,000 potential vulnerabilities across 1,000 open-sourc… Underminr: DNS Bypass Flaw Lets Attackers Hide C2 Traffic Behind 88M Trusted Domains The Underminr vulnerability exploits SNI mismatches in shared CDN infrastructure to hide C2 connections behind trus… Project Glasswing: Claude Mythos AI Finds 10,000 Critical Flaws in Widely Used Software Anthropic's Project Glasswing reports Claude Mythos AI found 10,000+ high/critical vulnerabilities in 1,000+ open-s…
    Scroll to Top
    Ad