A Quick Introduction of Linux Filesystem

This brief tutorial provides a quick introduction to Linux filesystems for new users and students who are not familiar with Linux.

If you’re a student or new user looking for a Linux system to start learning on, the easiest place to start is Ubuntu Linux OS. It’s a great Linux operating system for Linux beginners.

Ubuntu is an open-source Linux operating system that runs on desktops, laptops, servers, and other devices.

Students and new users will find that Linux isn’t so different from Windows in many ways, especially regarding its filesystem layout.

Both Linux and Windows have a hierarchical filesystem layout, meaning there is a single “root” directory and all other directories branch off the root directory.

Windows directories are designated with letters, such as C: or D: and Linux root directory is designated as /

Linux systems have several directories under their ( / ) directory. Windows on the other hand have few because Windows keeps everything under the:

  • C:/Program Files
  • C:/Program Files (x86)
  • C:/Users 
  • C:/Windows

Windows keeps applications either in C:/Program Files or the C:/Program Files (x86) directory.

Individual user profiles are kept in the C:/Users directory.

Linux on the other hand keeps its applications mostly under the /usr directory and individual user profiles are kept under the /home directory.

Linux /home directory corresponds to the Windows C:/Users directory. These are the default user profile directories where all user’s content is stored by default on both systems.

When writing a directory path under a Linux system, you should always begin with the root (  / ) directory. similarly, Windows should start with its root ( C:\ ).

Below is a table of Linux filesystem directories:

DirectoryPurpose
/usr/bin/bin directory contains the essential user binaries (programs)
/boot/boot directory contains the files needed to boot the system
/dev/dev directory contains a number of special files that represent devices.
/etcDirectory containing configuration files.
/home/home directory contains a home folder for each user.
/usr/lib/lib directory contains libraries needed by the essential binaries in the /bin and /bin folders.
/usr/lib64The directory contains 64-bit system libraries.
/media/media directory contains subdirectories where removable devices are automounted.
/mnt/mnt directory is where system administrators mounted temporary file systems while using them.
/opt/opt directory contains subdirectories for optional software packages.
/procThe directory contains a system to process information.
/rootThe root user’s home directory.
/runA runtime scratch directory (RAM-based).
/usr/sbinDirectory containing system binaries.
/srvDirectory containing service data.
/sysDirectory containing devices, kernel modules, filesystems, and other kernel component info.
/tmpDirectory containing temporary files.
/usrDirectory containing user programs.
/varDirectory containing variable files, such as logs and temporary files.

As you can see above, Linux has many more directories branching off its root directory.

Windows stores configuration files in many different locations, most of them reside somewhere under the C:\Windows directory and many other sub-directories like C:\Windows\system, C:\Windows\system32, and others.

Linux uses the /etc/ directory to keep configurations settings and others

Below is an image of both Windows and Linux filesystem layout

Linux (Ubuntu )

Liinux filesystem on Ubuntu

Windows 10 Filesystem

Windows 10 filesystem

That’s it!

There is more to this topic, but our goal here was to provide an introduction to both filesystems and their layout of their directories.