Main Content

Linux / Unix - layout of operating system files

Archive - Originally posted on "The Horse's Mouth" - 2007-11-20 12:12:56 - Graham Ellis

At the top level ..

Typically "read only"
bin - binaries - executable programs
sbin - system admin binaries - programs for the system / admin
lib - library files (needed by binaries and shared between them)
usr - the bulk of the operating system (the bit that is not needed to boot)

Typically "read write" by admin or system
dev - device files (how devices are handled)
etc - config files, startup files, etc
proc - "everything is a file" in 'nix - these are the current processes
var - read/write area for OS utilities / daemons

Open Season!
home - User's home directories and typically data areas
mnt - Mounts of discs from other computers (also media)
tmp - scratch area for anyone / everyone

In /usr - this is where parts that are NOT needed at boot up time are kept
bin - binaries - executable programs
sbin - system admin binaries - programs for the system / admin
lib - library files (needed by binaries and shared between them)
include - "Programmer's header files"
share - things common between architectures
etc - config files, startup files, etc
src - source
man - manual
local - local enhancements to OS - i.e. extra software you load (also /opt)

In /usr/local - this is where your own local additions are kept
bin - binaries - executable programs
sbin - system admin binaries - programs for the system / admin
lib - library files (needed by binaries and shared between them)
include - "Programmer's header files"
share - things common between architectures
etc - config files, startup files, etc
and others which are complete apps

In /usr/local/apache2 (for example) - this is within a particular open source product
bin - binaries - executable programs
lib - library files (needed by binaries and shared between them)
logs - log files
man - unix man pages
modules - extra code modules (similar to lib)
conf - configuration stuff
in this case ... web site at htdocs, icons, cgi-bin, manual etc

Ever wondered why the executables are mixed /bin, /sbin, /usr/bin, /usr/sbin, /usr/local/bin, /usr/local/apache2/bin, /usr/local/java/bin and so on ... perhaps the table above helps explain it a bit!