learnLinux MasteryDNS Resolution

// LINUX ROADMAP · Networking

DNS Resolution

60m0 materialstodo

/etc/resolv.conf, nslookup, ডিগ দিয়ে হোস্টনেমকে আইপিতে রূপান্তর করুন

Core Concepts & Mental Model

Standard Linux syntax follows: command [options] [arguments], for example: ls -la /home/joy. Use the sticky terminal on the right to practice simultaneously.

Command Cards & Analysis

4 commands
#01nslookup— সহজ DNS খোঁজ
Concept

ডোমেনের IP দ্রুত খোঁজা।

When to Use

দ্রুত DNS জানার জন্য।

SYNTAX
nslookup <ডোমেইন>
EXAMPLE
nslookup example.com
nslookup <ডোমেইন> 8.8.8.8
EXPECTED OUTPUT
Server:  8.8.8.8
Address: 8.8.8.8#53
Name: example.com
Address: <resolved_ip>
Important Note:

প্যাকেজ: Debian/Ubuntu-তে `bind9-dnsutils` বা `dnsutils`, Fedora/RHEL-তে `bind-utils`।

#02dig— DNS ট্রাবলশুট
Concept

ডোমেন কোন IP-তে যায়, DNS উত্তরে কী আসে — বিস্তারিত।

When to Use

DNS সমস্যা, ডোমেন ঠিক জায়গায় যাচ্ছে কিনা দেখতে।

SYNTAX
dig <ডোমেইন>
EXAMPLE
dig example.com
dig -x 203.0.113.10
EXPECTED OUTPUT
; <<>> DiG 9.18 <<>> example.com
;; ANSWER SECTION:
example.com. 300 IN A <resolved_ip>
Important Note:

প্যাকেজ: Debian/Ubuntu-তে `bind9-dnsutils` (বা `dnsutils`), Fedora/RHEL-তে `bind-utils`। না থাকলে ইন্সটল করুন।

#03cat— ফাইল সম্পূর্ণ প্রিন্ট
Concept

পুরো ফাইল স্ক্রিনে ছাপিয়ে দেয়।

When to Use

ছোট কনফিগ দেখতে, পাবলিক কী কপি করতে (প্রাইভেট নয়)।

SYNTAX
cat <file>
cat <file1> <file2>
EXAMPLE
cat notes.txt
cat ~/.bashrc
cat ~/.ssh/id_ed25519.pub
EXPECTED OUTPUT
# notes.txt এর ভেতরে যা আছে তা দেখাবে
ssh-ed25519 AAAAC3... user@host
Important Note:

`cat` বড় ফাইলে স্ক্রিন ভরিয়ে ফেলে। বড় ফাইলে `less` ব্যবহার করুন। আর কখনোই `cat ~/.ssh/id_ed25519` শেয়ার করবেন না।

#04getent hosts google.com— getent hosts google.com
Concept

Run command in terminal to test.

SYNTAX
getent hosts google.com
EXAMPLE
getent hosts google.com
EXPECTED OUTPUT
(no output returned)

Curated reference links

My learning notes

/etc/resolv.conf, nslookup, ডিগ দিয়ে হোস্টনেমকে আইপিতে রূপান্তর করুন

joy@ubuntu: ~ (bash)
0/4
Targets:
joy@ubuntu:~$
nslookup google.com
Tab autocomplete↑/↓ history