• What is a Filesytem
  • Current Linux Structure Directory
  • Things to consider

What is a Filesystem

A filesystem is the structure of how data is organized in Linux such as boot files, binaries, user´s data, config files, libraries, temp files, etc. A partition with a filesystem is needed in order to store these kind of files.

On Linux there may be more than one partitions on disks using different filesystems. Those filesystems can be found mounted as subdirectories in the directory tree and even can be located either locally or across the network.

Sometimes users refer a filesystem as:

  • partition
  • disk
  • type of filesystem

Programs run on a filesystem, so a partition must has a filesystem on it to operate properly.

Current Linux Structure Directory

fhs

Things to consider

  • I would recommend to understand what kind of files are stored in each filesystem and stick with that. You may find some symlinks on each Linux distribution preserving same commands for compatibily purpose such as /bin, /lib, /lib64, /sbin.

     /bin   ------> /usr/bin
    
     /lib   ------> /usr/lib
    
     /lib64 ----> /usr/lib64
    
     /sbin  ----> /usr/sbin
    
  • Pseudo-filesystems such as /dev, /proc, /sys stores system properties in memory, which help to the system works as intended, also /run is a pseudo-fylesystem.

  • Linux kernel modules are stored under /lib directory, also we can find the Pluggable Authenticaion Module (PAM) here as well.

  • Files needed for the system to startup are stored in /boot directory , also here we can find the compressed Linux Kernel (vmlinuz) and the initial ram filesystem (initramfs)

  • System log files such as service messages, web server logs are stored under /var directory.

  • Users files are stored under /home directory

  • All system configuration files should be stored under /etc directory, NO binaries should be stored here.

Sources: