Understanding the Ubuntu Linux File System Hierarchy

Understanding the Ubuntu Linux File System Hierarchy

Sep 5, 2012

Linux has inherited from UNIX a well-planned hierarchy for organizing where things may be found. It isn’t perfect, but it is generally logical and mostly consistent, although distributions do tend to make some modifications that force some thinking and adaptation when moving between, say, Fedora, Slackware, and Ubuntu. The following table shows some of the top-level directories that are part of a standard Linux distro.

Name Description
/ The root directory
/bin Essential commands
/boot Boot loader files, Linux kernel
/dev Device files
/etc System configuration files
/home User home directories
/lib Shared libraries, kernel modules
/lost+found Directory for recovered files (if found after a file system check)
/media Mount point for removable media, such as DVDs and floppy disks
/mnt Usual mount point for local, remote file systems
/opt Add-on software packages
/proc Kernel information, process control
/root Super user (root) home
/sbin System commands (mostly root only)
/srv Holds information relating to services that run on your system
/sys Real-time information on devices used by the kernel
/tmp Temporary files
/usr Software not essential for system operation, such as applications
/var Variable data (such as logs); spooled files

Knowing these directories can help you find files when you need them. This knowledge can even help you partition hard drives when you install new systems by letting you choose to put certain directories on their own distinct partition, which can be useful for things like isolating directories from one another, such as a server security case like putting a directory like /boot that doesn’t change often on its own partition and making it read-only and unchangeable without specific operations being done by a super user during a maintenance cycle. Desktop users probably won’t need to think about that, but the directory tree is still quite useful to know when you want to find the configuration file for a specific program and set some program options system wide to affect all users.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>