Linux Filesystem Structure
Windows-এ সব শুরু হয় C:\ থেকে। Linux-এ সব শুরু হয় / (root) থেকে। এই একটা concept বুঝলে Linux filesystem আর confusing লাগবে না।
The Root
Linux-এ / হলো সবকিছুর শুরু। এটাকে বলা হয় root directory।
ভাবো এটা একটা গাছের মতো। গাছের গোড়া হলো /, আর বাকি সব folder হলো সেই গাছের ডালপালা।
/ — root (সবকিছুর গোড়া)
├── home/ — তোমার personal files
├── etc/ — system configuration files
├── var/ — logs, databases
├── tmp/ — temporary files
├── bin/ — basic commands (ls, cp, mv...)
├── usr/ — installed programs
├── root/ — root user এর home
├── dev/ — devices (keyboard, USB...)
└── proc/ — running processes infoমনে রাখো: /root আর / এক না। / হলো সব folder-এর গোড়া। /root হলো root user (admin) এর personal folder।
Important Directories
/home
তোমার personal home folder। Windows-এ যেটা C:\Users\Omar — Linux-এ সেটা /home/omar।
# নিজের home folder-এ যাও
cd /home/omar
# বা shortcut দিয়ে
cd ~
# দেখো কোথায় আছ
pwd
# Output: /home/omarতোমার Documents, Downloads, Pictures — সব /home/omar/ এর ভেতরে থাকে।
/etc
Configuration ফাইলের গুদাম — system-এর সব important configuration file এখানে থাকে।
# Network hostname দেখো
cat /etc/hostname
# কোন users আছে system-এ
cat /etc/passwd
# Password hashes (শুধু root দেখতে পারে)
cat /etc/shadowCyberSec Note: /etc/passwd আর /etc/shadow — এই দুটো file CTF challenge আর penetration testing-এ খুব common target। /etc/passwd সব user দেখতে পারে, কিন্তু /etc/shadow-এ actual password hash আছে — সেটা শুধু root read করতে পারে।
/var
এখানে থাকে এমন data যেটা constantly change হয়। সবচেয়ে important হলো log files।
# System log দেখো
cat /var/log/syslog
# Authentication log — কে login করেছে
cat /var/log/auth.log
# Apache web server log (installed থাকলে)
cat /var/log/apache2/access.logCyberSec Note: Log analysis cybersecurity-র একটা core skill। কেউ unauthorized login করলে, কোনো attack হলে — সব evidence থাকে /var/log/ এ। Forensics, Incident Response সব কাজে logs দেখতে হয়।
/tmp
Temporary files রাখার জায়গা। System restart করলে এই folder empty হয়ে যায়।
# tmp folder এ যাও
cd /tmp
# দেখো কী আছে
ls -laCyberSec Note: Hackers প্রায়ই /tmp ব্যবহার করে malicious script রাখতে। কারণ এখানে যেকেউ write করতে পারে এবং সাধারণত monitor করা হয় না। CTF-এ privilege escalation করতে গেলে /tmp তে script রাখা common।
/bin and /usr/bin
তুমি যে commands use করো (ls, cp, mv, cat) — সেগুলোর actual program file এখানে থাকে।
# ls command কোথায় আছে
which ls
# Output: /usr/bin/ls
# cat command কোথায় আছে
which cat
# Output: /usr/bin/cat/root
Root user (system-এর admin) এর personal folder। সাধারণ user এখানে ঢুকতে পারে না।
# এই command সাধারণত access denied দেবে
ls /root
# Permission denied/proc
একটা virtual filesystem — disk-এ কোনো actual file নেই। System runtime-এ তৈরি করে, running processes-এর information store করে।
# CPU information
cat /proc/cpuinfo
# Memory information
cat /proc/meminfoFull Filesystem Tree
Summary Table
| Directory | কী থাকে | Importance |
|---|---|---|
/home | User-এর personal files | High |
/etc | System config files | High |
/var/log | Log files | High (CyberSec) |
/tmp | Temporary files | Medium (CyberSec) |
/bin, /usr/bin | Commands/Programs | High |
/root | Root user home | Medium |
/dev | Device files | Low |
/proc | Process info | Medium |
Practice
# 1. Root থেকে সব folder দেখো
ls /
# 2. তোমার home folder এ যাও
cd ~
pwd
# 3. /etc এ কী আছে দেখো
ls /etc | head -20
# 4. তোমার hostname কী
cat /etc/hostname
# 5. System-এ কোন users আছে
cut -d: -f1 /etc/passwdQuick Check
-
/(root) আর/rootএর পার্থক্য বলতে পারবে? - Config files কোথায় থাকে?
- Log files কোথায় দেখবে?
-
/tmpকেন cybersecurity-তে important?
এই section শেষ।
পরবর্তী Section → Terminal Basics