0
0
Linux CLIscripting~15 mins

nslookup and dig for DNS in Linux CLI - Mini Project: Build & Apply

Choose your learning style9 modes available
Using nslookup and dig for DNS Queries
📖 Scenario: You are working as a network technician. You need to check the IP address of a website and verify DNS records using command-line tools.
🎯 Goal: Learn how to use nslookup and dig commands to find DNS information about a domain.
📋 What You'll Learn
Use nslookup to find the IP address of example.com
Use dig to query the A record of example.com
Use dig to query the MX record of example.com
Display the results clearly in the terminal
💡 Why This Matters
🌍 Real World
Network administrators and IT support use nslookup and dig to check DNS records and troubleshoot domain name issues.
💼 Career
Knowing how to use these commands is essential for roles in network management, cybersecurity, and system administration.
Progress0 / 4 steps
1
Use nslookup to find the IP address
Type the command nslookup example.com to find the IP address of example.com.
Linux CLI
Need a hint?

Type nslookup example.com exactly to get the IP address.

2
Use dig to query the A record
Type the command dig example.com A to query the A record (IPv4 address) of example.com.
Linux CLI
Need a hint?

Use dig example.com A to get the IPv4 address record.

3
Use dig to query the MX record
Type the command dig example.com MX to find the mail exchange servers for example.com.
Linux CLI
Need a hint?

Use dig example.com MX to find mail servers.

4
Display the results clearly
Type the commands again to display all results in the terminal: nslookup example.com dig example.com A dig example.com MX
Linux CLI
Need a hint?

Run all three commands one after another to see the DNS information clearly.