Unix File Structure

Back to Unix

Single rooted tree at /. Instead of separate trees (as with disk partitioning), volumes can be mounted on a directory. Two-disk setups used to be common, with first disk with startup programs and second mounted as /usr.

/bin

Contains binaries, including fundamental utilities like ls and cp used to mount /usr. This is loaded in the $PATH which exposes these binaries as commands from your shell.

/boot

Contains files required for booting process

/etc

System-wide configuration files and system databases.

/dev

Location of special or device files. Files here can represent external devices like speakers, or data volumes.

/home

Contains user home directories. OSX useds /Users instead.

lib

Contains shared libraries needed by programs in /bin

/media

Default mount point for removable devices

/opt

Locally installed software.

/proc

procfs virtual filesystem showing informaiton about processes as files

/root

Home directory for superuser "root".

/sbin

System binaries, containing fundamental utilities like init for start, maintain, and recovery of system.

/usr

User file system. Holds executables , libraries, shared resources not system critical.

/var

Variable, place for files that change often.