Linux Structure#
Filesystem Hierarchy Standard layout. The operator uses this map to know where binaries, configuration, user data, and runtime state live on any Linux distribution.
Directory hierarchy#
Directory |
Description |
|---|---|
|
Primary hierarchy root and root directory of the entire file system. |
|
Essential command binaries needed in single-user mode, for all
users ( |
|
Boot loader files, kernels, initrd. |
|
Device files ( |
|
Host-specific system-wide configuration. |
|
Configuration for add-on packages stored in |
|
Catalogs for SGML / XML processing software. |
|
X Window System v11 configuration. |
|
Users’ home directories. |
|
Libraries essential for binaries in |
|
Alternative format essential libraries (optional). |
|
Mount points for removable media (CD-ROMs, USB). |
|
Temporarily mounted filesystems. |
|
Optional application software packages. |
|
Virtual filesystem exposing process and kernel information as files (procfs). |
|
Home directory for the root user. |
|
Run-time variable data since last boot (logged-in users, running daemons). |
|
Essential system binaries ( |
|
Site-specific data served by this system (web, FTP, VCS). |
|
Devices, drivers, and kernel features. |
|
Temporary files (not preserved across reboots, may be size-limited). |
|
Secondary hierarchy for read-only user data (utilities, applications). |
|
Non-essential command binaries. |
|
Standard include files. |
|
Libraries for |
|
Tertiary hierarchy for local data, specific to this host. |
|
Non-essential system binaries (network-service daemons). |
|
Architecture-independent (shared) data. |
|
Source code (including kernel source). |
|
Variable files (logs, spool, temp mail). |
|
Application cache data. |
|
Persistent state (databases, package metadata). |
|
Lock files for resources currently in use. |
|
Log files. |
|
Mailbox files. |
|
Variable data from packages in |
|
Run-time variable data since boot. |
|
Spool for tasks waiting (print queues, outgoing mail). |
|
Deprecated mailbox location. |
|
Temporary files preserved between reboots. |
Important file locations#
/boot/vmlinuz Linux kernel file
/dev/had first IDE HDD device file
/dev/hdc IDE CDROM device file
/dev/null pseudo device
/etc/bashrc system defaults and aliases used by bash
/etc/crontab cron run commands on a predefined time interval
/etc/exports filesystem available on the network
/etc/fstab disk drive info and mount points
/etc/group security group information
/etc/grub.conf grub bootloader configuration
/etc/init.d service startup scripts
/etc/lilo.conf lilo bootloader configuration
/etc/hosts IPs and corresponding hostnames
/etc/hosts.allow hosts allowed access to services
/etc/hosts.deny hosts denied access to services
/etc/inittab INIT process and run-level interactions
/etc/issue pre-login message
/etc/modules.conf configuration files for system modules
/etc/mtab currently mounted blocks
/etc/motd message of the day
/etc/passwd system users (password hash redacted)
/etc/printcap printer information
/etc/profile bash shell defaults
/etc/profile.d application script, executed after login
/etc/rc.d run-level specific script information
/etc/rc.d/init.d run-level initialisation script
/etc/resolv.conf DNS servers used by the system
/etc/securetty terminal list where root login is possible
/etc/shadow system users with password hash
/etc/skel script that populates new user home dir
/etc/termcap ASCII terminal behavior definitions
/etc/X11 X-window configuration files
/usr/bin normal user executable commands
/usr/bin/X11 binaries of X windows system
/usr/include files used by C programs
/usr/share shared man, info files
/usr/lib libraries required for compilation
/usr/sbin super-user commands for sysadmin
/proc/cpuinfo CPU information
/proc/filesystems filesystems currently in use
/proc/interrupts current interrupts
/proc/ioports I/O addresses used by devices
/proc/meminfo memory usage info
/proc/modules currently loaded kernel modules
/proc/mount mounted filesystem info
/proc/stat detailed system statistics
/proc/swaps swap file info
/version Linux version
/var/log/auth* authorization login attempts
/var/log/lastlog last boot
/var/log/messages syslog daemon messages
/var/log/wtmp login time and duration per user