Linux File System | Directory Structure

Linux File System

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

Leave any Questions and Comments below and I will get back to you. I regularly publish on YouTube and christitus.com so if you’d like to see more videos and articles click the subscribe button in the top right. If you need immediate assistance, check out our discord channel at Chris Titus Tech Discord.

2 Comments

  1. Keith Roberts

    Thanks Chris. Your videos are always informative. This information works better as an article. Like you I have spent most of my career supporting Windows networks but I have become quite disillusioned with Windows 10. I need to find just a couple of replacement programs and I will be Linux only at home. I had tried Ubuntu a few years ago but I had a difficult time getting it to work with my Nvidia graphics card. At the time printing was another arduous task. I have recently tried vanilla Debian (both 9 and then 10) and all I needed to do to print was turn on the printer and choose it. Nvidia drivers are still a hassle on vanilla Debian but the documentation for installing the driver is quite good. The one gotcha was editing the grub line in order to display something other than a black screen at boot time.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: