Linux File System Hierarchy



/ Root directory for the entire file system
/bin Essential command binaries that need to be available in single user mode; for all users
/boot Boot Loader Files
/dev Essential Devices Config
/etc Host-specific system-wide configuration files
/etc/opt Configuration files for add-on packages that are stored in /opt/.
/home Users’ home directories, containing saved files, personal settings, etc.
/lib Libraries essential for the binaries in /bin/ and /sbin/.
/media Mount Points for Removable media such as CD-ROMS
/mnt Temporarily mounted filesystems
/opt Optional Application Software Packages
/proc Virtual Filesystem providing information about processes and kernel information as files.
/root Home Directory for root user
/sbin Essential System binaries e.g init,ip,mount
/srv Site specific data which are served by the system
/tmp Temporary files.
/usr Secondary hierarchy for read-only user data; contains the majority of (multi-)user utilities and applications.
/usr/bin Non-essential command binaries (not needed in single user mode); for all users.
/usr/sbin Non-essential system binaries, e.g., daemons for various network-services.
/var Variable files—files whose content is expected to continually change during normal operation of the system—such as logs, spool files, and temporary e-mail files.


if I’m writing my own scripts, where should I add these?

Please use /usr/local/bin or /usr/local/sbin for system-wide available scripts. The local path means it’s not managed by the system packages


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s