Debian Root Directories
In a Debian Linux system, the root directory (/) is the top-level directory of the file system. It contains all the essential directories that make up the operating system and user environment. Understanding these directories helps in managing, troubleshooting, and customizing your Debian system. You can download a bash script flashcard game to help you memorize these directories here.
Key Root Directories in Debian
- /bin – Essential user command binaries (e.g.,
ls, cp, rm).
- /boot – Contains the kernel and bootloader files (e.g.,
vmlinuz, initrd.img).
- /dev – Contains device files for hardware devices (e.g.,
/dev/sda, /dev/tty).
- /etc – Configuration files for the system and installed packages.
- /home – User-specific directories (e.g.,
/home/user).
- /lib – Essential shared libraries and kernel modules.
- /lib64 – 64-bit versions of shared libraries (used in 64-bit systems).
- /media – Mount points for removable media (e.g., USB drives, CDs).
- /mnt – Mount points for temporary filesystems (e.g.,
/mnt/usb).
- /opt – Optional add-on application packages.
- /proc – Virtual filesystem that provides process and kernel information.
- /root – Home directory for the root user.
- /run – Runtime variable data (e.g., process IDs, socket files).
- /sbin – Essential system binaries (e.g.,
init, iproute).
- /srv – Data served by the system (e.g., web server content).
- /sys – Virtual filesystem for kernel and device information.
- /tmp – Temporary files that can be deleted at any time.
- /usr – User binaries, libraries, and documentation (e.g.,
/usr/bin, /usr/lib).
- /var – Variable data such as logs, caches, and spool files.
- vmlinuz – The Linux kernel image used by the bootloader.
- vmlinuz.old – A backup of the previous kernel image.
- initrd.img – Initial RAM disk used during boot to load the kernel.
- initrd.img.old – Backup of the previous initramfs image.
- lost+found – A directory used by the filesystem to recover lost files.
- snap – Directory for Snap packages (used in Ubuntu/Debian derivatives).
These directories form the foundation of a Debian system, each serving a specific role in the operation and management of the system. Understanding their purposes helps in system administration, troubleshooting, and customization.