Linux File System | Directory Structure

This article details the Linux File System and it’s directory structure.

Linux File System – Root

  • / -This is the root directory which should contain only the directories needed at the top level of the file structure
  • /bin – This is where the executable files are located. These files are available to all users, but do not add programs manually here
  • /dev – These are devices in your system – Not Mounted!
  • /etc – Superuser directory commands, configuration files, disk configuration files, valid user lists, groups, ethernet, hosts, etc.
  • /lib – Contains shared library files and sometimes other kernel-related files
  • /boot – Contains files for booting the system /boot/efi for EFI systems
  • /home – Contains the home directory for users and other accounts
  • /media – Typically used to mount permanent file systems
  • /mnt – Used to mount other temporary file systems, such as cdrom and floppy for the CD-ROM drive and floppy diskette drive, respectively
  • /proc – Contains all processes marked as a file by process number or other information that is dynamic to the system
  • /tmp – Holds temporary files used between system boots
  • /usr – (Unix System Resource) Used for miscellaneous purposes, and can be used by many users. Includes administrative commands, shared files, library files, and others
  • /var – Typically contains variable-length files such as log and print files and any other type of file that may contain a variable amount of data
  • /sbin – Contains binary (executable) files, usually for system administration. For example, fdisk and ifconfig utlities
  • /kernel – Contains kernel files

Home Directory Structure

/home/user is the home directory for your user and it is often abbreviated with a ~. Folders starting with a period are hidden and can be looked at via options in file browser or ls -al in terminal.

  • ~/.cache – Cache files for that user
  • ~/.config – User Configuration files for your programs.
  • ~/.local/share – User Configuration files for your system. Edit Application in start menu, modify system configurations for your user, etc.
  • ~/.ssh – SSH configuration and keys
  • ~/.vnc – VNC remote desktop configuration files
  • ~/.steam – default steam location for games and config files
  • ~/.bashrc (FILE) – This file controls shortcuts and aliases that you use in Terminal

This details the Linux File System and should give you a better understanding of how to navigate around in not only a Linux system, but any UNIX based OS for that matter.

Video Walkthrough