Linux Directory Structure (BlizBlaze.net)
LINUX dir structure explained
| Dir | Name | Info |
|---|---|---|
| / | The Root Directory | Single unified FS, Holds everything (even external drives unlike windows which uses seperate letters for each drive) |
| /boot | Boot Dir | stores all the core files and data required to boot the operating system (initrd, initramfs, GRUB) |
| /root | root users home dir | Dir used for user roots home files |
| /home | Home | Dir for all users files (except root) |
| /bin | Binary | Essental CLI tools required for the system to run properly (ls, cp, mv, cat) |
| /sbin | System Binary | Specalised system utilities, and general puropse commands |
| /etc | et cetera | system-wide CONFIG files (/etc/passwd, /etc/fstab) |
| /lib | Library | Shared Library files, such as input/output, so commands do not all have to include that code themselves |
| /lib32 /lib64 | 32bit/64bit libs | Also stores kernel modules here (plugable modules that extend the kernels functionality) |
| /usr | Unix System Resourse | Installed programms, user-land programs and data (non-system) |
| /dev | Device | contains the special device files for all the devices (everything in linux is a file) |
| /mnt | Mount | A place where admins can mount network shares or temporary file systems (/mnt/share, /mnt/cdrom, /mnt/recoverHDD) |
| /media | Media | Automatic mounting of removable media like USB flash drives, CDs, and SD cards (which are usually plugged in and out by regular users) |
| /proc | Processes | Virtual Filesystem (procfs) containing runtime system information, a process information pseudo-file system (/proc/cpuinfo, /proc/meminfo, /proc/mounts) |
| /sys | System File System | Virtual Filesystem (sysfs) that exposes the Linux kernel's view of hardware devices, drivers, and system subsystems (/sys/module/, /sys/devices/) |
| /run | Run | stores volatile, temporary runtime data describing the system since it booted. It is implemented as a tmpfs filesystem, meaning its contents reside purely in RAM and are completely wiped upon every reboot |
| /srv | Service | Its primary purpose is to store site-specific data for your system actively serve to users or other networks (like web pages, FTP files, or version control repositories) |
| /var | Variable | Contains variable data files. This includes spool directories and files, administrative and logging data, and transient and temporary files (/var/log, /var/spool, /var/mail, var/www, The default location used by many web servers aka Apache/Nginx) |
| /tmp | Temporary | provides a temporary holding space for files that applications and the operating system need only for a short time, world readable and Cleared upon reboot(sticky-bit, users can only delete their own files) |
| /opt | Optional | Installing optional or third-party add-onVender Software (TeamSpeak, Chrome) |