The Linux Filesystem
/ - The Root Directory
System root
/bin - User Binaries
In single user mode this is where user apps such as firefox etc are stored
/sbin is similar in that is is where administration binaries are stored.
/boot - Static Boot Files
GRUB, linux kernels are stored here, needed to be able to boot the system. Config for boot is stored in /etc
/dev - Device Files
Devices are exposed as files. Eg /dev/sda represents the first SATA drive.
It also contains psuedo-devices. For example: /dev/random produces random numbers.
/dev/null returns no output and discards all input.
/etc - Configuration Files
Contains systems wide configuration files. User specific config files live in each users /home/{user} folder
/home - Home Folders
User specific files and user specific configuration.
/lib - Shared Libraries
Contains essential libraries consumed by binaries in /bin and /sbin.
/usr/lib contains libraries consumed by binaries in /usr/bin
/lost+found Recovered Files
On system crash, recovered files are saved here.
/media - Removable Media
Inside media there are subdirectories that represent removable media such as CDs.
/mnt - Temporary Mount Points
This is where typically temporary file systems are mounted. For example a windows partition. However its possible to mount file systems anywhere on the system.
/opt - Optional Packages
Optional software packages. Typically used by proprietary software that doesn't obey the standard file system hierarchy.
/proc - Kernel and Process Files
Files that contain system and process information and state
/root - Root Home Directory
Root user home directory
/run - Application State Files
Gives apps a place to store transient files such as sockets and process IDs. /tmp cant be used as file in there may be deleted. /run is fairly new.
/sbin - System Administration Binaries
Contains essential binaries needed by the root user for system administration.
/selinux - SELinux Virtual File System
If your linux system uses SELinux for security (Fedora and Red Hat for example), this directory contain special files related to that. Similar to /proc
/srv - Service Data
Contains data for system services. For example if using Apache website files normally reside in /srv
/tmp - Temporary Files
These files are typically deleted upon restart and might be removed intermittently by utilities such as tmpwatch
/usr - User Binaries and Read-Only Data
Read-only user applications (binaries) and read only files use by users.
/usr/bin is used to store user binaries.
/usr/lib is used to store user libraries
/usr/local is where locally compiled applications are installed to, which prevents them from disrupiting the rest of the system.
/var - Variable Data Files
/var is the writable counterpart to the /usr directory which is read only.
Cache, mail, Log files and anything that would need to be written at runtime, are written to the /var directory.
/var/tmp contains user tmp data that needs to be preserved between reboots.
/var/spool/cron contains the variable data for cron jobs.
Comments
Post a Comment