The File System

There are a few notable differences in how files work on Linux when compared to Windows or macOS.

The most noticeable difference is case sensitivity. Windows and macOS are case-insensitive, meaning that FOLDER and Folder are the same folder. Linux on the other hand is case-sensitive, so FOLDER and Folder are two different folders.

In Linux, and more widely, UNIX, everything is a file. Unlike Windows which has other object types to represent physical devices.

The File System Hierarchy

Unlike Windows, Linux has a standardized file system hierarchy (FSH.) The FSH is contained within / (often called root.) They not only contain normal files, but also physical devices, virtual devices, and various other special files that control the system itself.

It should also be noted that Linux uses a forward slash (/) to represent going deeper in a directory, unlike Windows which uses a backslash (\)

The directory structure is as follows:

DirectoryDescription
/The root directory with the all the other directories and files. This is as far back as you can go
/binExecutables and command binares required for a functioning system. Most applications installed from RPM end up here.
/bootThe bootloader and files used during early boot process. May usually be in a seperate partition.
/devSpecial device files for various purposes (/dev/sda for a drive, /dev/null for blank data, /dev/random for pseudo-random data, /dev/tty for terminal sessions, etc).
/etcSystem-wide settings and configuration files.
/homeUser files. This is where your stuff lives!
/libLibraries required for executables in /bin to function. May be also named /lib<arch>.
/mediaMount points for when the system mounts removable media, such as USB drives, SD cards, etc.
/mntTemporary mount points for media. Usually used when manually mounting a drive.
/optOptional packages that may be installed by the user. Most packages don’t actually install here.
/procProcess data and kernel information for inter-process communication managed by the kernel.
/rootUser data for the root user. Don’t confuse this with / (root)
/sbinExecutables for system tasks.
/srvShared service data used by server processes, such as web servers and NAS/File servers.
/tmpTemporary data.
/usrShared application data used by all users.
/varVariable data used by system processes.

The Home Directory

The home folder is the place where all your personal data, and most of your apps are stored. It is a directory that is located under the /home directory, followed by your username. It is similar to the Users folder in Windows.

In Linux, the home folder is usually more extensively used than in Windows, as it stores all user-specific data, settings, and the majority of your applications (Flatpaks). The system folders are only used when making system-wide changes or installing applications from DNF or an RPM File.

Virtual Memory

Virtual memory is a feature in Linux and other operating systems that allows the system to use a portion of the disk as RAM. This is useful when the system runs out of RAM and needs to use the disk as a temporary storage for data.

On Windows, this is called a “Page file”, and on Linux, it is called a “Swap file”. The swap file is usually located at /swapfile or as a dedicated partition on the disk.

Swap comes with many issues, for example, it can reduce the lifespan of lower-cost SSDs, and may be too slow on hard drives. To combat this Ultramarine uses memory compression (zram specifically).

By default, we match the amount of physical memory you have. (Which is the maximum)

Although this may sound magical, it does come at the cost of your CPU working a little bit harder. Luckily this is not very noticeable on modern computers.

Learn more about zram →

File system formats

Ultramarine Linux supports a wide variety of file systems, and can be configured to use any of them during installation.

It currently supports most file systems that are supported by the Linux kernel, including:

  • ext2, ext3, ext4
  • Btrfs
  • XFS
  • NTFS
  • FAT32

And extra file system drivers can be installed, such as:

  • ZFS

The Ultramarine Linux installer will be configured to use the BTRFS file system by default, as it is the most modern file system that is supported by the Linux kernel, and has many features that are useful for desktop users, such as snapshots, virtual volumes, journalling, error correction and compression.

By default, it will use up all the available space on the disk. It uses a small portion of the spaces for the EFI bootloader partition, and create a BTRFS JBOD array using the rest of all the available space on all selected disks. It then creates 2 subvolumes, one for the root directory /, and one for the home directory /home, which will share the same space but have different filesystem settings.

So unless specified otherwise, the installer will use all your disks to create a JBOD (spanned) array, which may be undesirable if you do not want to risk losing all your data if one of the disks fail.

Most server installations will use XFS or ZFS, as they have better performance and reliability for servers, and are more suitable for RAID arrays.

Remote Filesystems

Ultramarine Linux can also mount remote file systems from a remote server or NAS, using the NFS, (S)FTP, SMB, and WebDAV protocols.

← Back To: What is Linux?

Next Up: Device Files →