wiki.allensmith.net

Personal "Rough Notes" & Useful Links

User Tools


Linux Directory Structure Summary

References:
Filesystem Hierarchy Standard (FHS) → http://www.pathname.com/fhs/
tecmint.com → Linux Directory Structure and Important Files Paths Explained
edx.org → LinuxFoundationX: LFS101x.2 Introduction to Linux » Chapter 03 → Section 1: Linux Filesystem Basics
blackmoreops.com → Linux file system hierarchy

This document is some very rough Personal Notes. As such, some information in this may not be correct. Any errors or omissions introduced into this information would be my mistake, so that should not be held against any sources I have used to help put this together.

All Linux filesystem names are case-sensitive, so /boot, /Boot, and /BOOT represent three different directories (or folders).
On a UNIX system, everything is a file; if something is not a file, it is a process.
/bin/
All the executable binary programs (files) required during booting, repairing, files required to run into single-user-mode, and other important basic commands

/boot/
Holds important files during boot-up process, including Linux Kernel.

/dev/
A pseudo file-system that contains device files for all the hardware devices on the machine.

/etc/
Contains Application’s configuration files, startup, shutdown, start, stop script for every individual program.

/home/
Home directory of the users. Every time a new user is created, a directory in the name of user is created within home directory which contains other directories like Desktop, Downloads, Documents, etc..

/lib/
The Lib directory contains kernel modules and shared library images required to boot the system and run commands in root file system.

/media/
Removable Media Drives and Removable Devices are often mounted as a tremporary directory undrer /media
e.g. a Floppy Disk labeled OLDTECH might end up being found at /media/OLDTECH ... thus a file README.txt on that disk would be at /media/OLDTECH/README.txt

/mnt/
Temporary mount directory for mounting a file system.

/opt/
Optional is abbreviated as opt. Contains third party application software.
e.g. ... Java, etc..

/proc/
This pseudo filesystem contains files and directories that mimic kernel structures and configuration information -- including running process with a particular Process-id (a.k.a. pid).

/root/
This is the home directory of root user -- and should never be confused with ‘/‘

/sbin/
Contains binary executable programs, required by System Administrator, for Maintenance.
e.g. ... iptables, fdisk, ifconfig, swapon, reboot, etc.

/srv/
Service is abbreviated as ‘srv‘. This directory contains server specific and service related files.

/sys/
Modern Linux distributions include a /sys directory as a virtual filesystem -- which stores and allows modification of the devices connected to the system.

/tmp/
System’s Temporary Directory, Accessible by users and root. Stores temporary files for user and system, till next boot.

/usr/
Contains executable binaries, documentation, source code, libraries for second level program. ... Many distributions distinguish between core utilities needed for proper system operation and other programs. These "other" second level programs are then placed in directories under /usr (think "user").

/var/
Stands for variable. The contents of this file is expected to grow. This directory contains log, lock, spool, mail and temp files.