Skip to Content

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

Terminal
# নিজের home folder-এ যাও cd /home/omar # বা shortcut দিয়ে cd ~ # দেখো কোথায় আছ pwd # Output: /home/omar

তোমার Documents, Downloads, Pictures — সব /home/omar/ এর ভেতরে থাকে।


/etc

Configuration ফাইলের গুদাম — system-এর সব important configuration file এখানে থাকে।

Terminal
# Network hostname দেখো cat /etc/hostname # কোন users আছে system-এ cat /etc/passwd # Password hashes (শুধু root দেখতে পারে) cat /etc/shadow

CyberSec 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।

Terminal
# System log দেখো cat /var/log/syslog # Authentication log — কে login করেছে cat /var/log/auth.log # Apache web server log (installed থাকলে) cat /var/log/apache2/access.log

CyberSec Note: Log analysis cybersecurity-র একটা core skill। কেউ unauthorized login করলে, কোনো attack হলে — সব evidence থাকে /var/log/ এ। Forensics, Incident Response সব কাজে logs দেখতে হয়।


/tmp

Temporary files রাখার জায়গা। System restart করলে এই folder empty হয়ে যায়।

Terminal
# tmp folder এ যাও cd /tmp # দেখো কী আছে ls -la

CyberSec 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 এখানে থাকে।

Terminal
# ls command কোথায় আছে which ls # Output: /usr/bin/ls # cat command কোথায় আছে which cat # Output: /usr/bin/cat

/root

Root user (system-এর admin) এর personal folder। সাধারণ user এখানে ঢুকতে পারে না।

Terminal
# এই command সাধারণত access denied দেবে ls /root # Permission denied

/proc

একটা virtual filesystem — disk-এ কোনো actual file নেই। System runtime-এ তৈরি করে, running processes-এর information store করে।

Terminal
# CPU information cat /proc/cpuinfo # Memory information cat /proc/meminfo

Full Filesystem Tree


Summary Table

Directoryকী থাকেImportance
/homeUser-এর personal filesHigh
/etcSystem config filesHigh
/var/logLog filesHigh (CyberSec)
/tmpTemporary filesMedium (CyberSec)
/bin, /usr/binCommands/ProgramsHigh
/rootRoot user homeMedium
/devDevice filesLow
/procProcess infoMedium

Practice

Terminal
# 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/passwd

Quick Check

  • / (root) আর /root এর পার্থক্য বলতে পারবে?
  • Config files কোথায় থাকে?
  • Log files কোথায় দেখবে?
  • /tmp কেন cybersecurity-তে important?

এই section শেষ।

পরবর্তী Section → Terminal Basics

Search Keywords: linux filesystem structure, linux directory structure, /etc /var /home /tmp explained, linux folder structure bangla, linux root directory

Last updated on