Linux file System and Naming Convention Explained
An operating system uses files to save data. A file may contain any meaningful data. For example, it may store a compiled software program, a script, a letter, a user database, a picture, a video, an audio clip, etc. This tutorial explains how Linux organizes files and what convention it uses for file names.
What is the Linux file system?
Computers use hard disks to store data. A hard disk contains a single ample disk space to save data. It is similar to the land area we buy to build the house. We can not directly use the land for residential purposes. First, we make a house on it. A house contains partitions. A partition contains rooms. We use rooms to live in.
Similarly, we can not directly use the hard disk to save data. First, we create partitions and format each partition with a file system. A file system defines and manages blocks on the partition. There are many file systems. We can use the same file system on all partitions or a different file system on each partition. Each file system uses a different block size and method to manage blocks. A block is the smallest disk space on the partition we use to save the data. It is similar to a room in the house. Each block has a unique identity. The file system uses this identity to track and manage the data it saves.
When we save a file, the system saves its data in blocks. The required blocks to save the data depend on the file size. For example, a small file needs a few blocks. At the same time, a large file requires many blocks. When we delete a file, blocks used to save its data become free.
The File System Standard (FSSTND)
The Linux kernel is freely available to all. Anyone can make and distribute his own Linux. Due to this, several Linux flavours exist. These flavours are known as distributions. Typically, all distributions follow the FSSTND (File System Standard) when organizing the file system hierarchy.
The File System Standard (FSSTND) defines standard locations for essential system files. It allows users to find important system files at the exact location in all Linux flavours. The FSSTND organizes all essential files in directories. It starts the Linux file system hierarchy with a directory known as the root (/) directory. All files and directories are created and managed under this (root) directory.
Since the root directory stands on the top of the file system, it has no parent directory. Besides the root directory, every directory has a parent directory. Linux allows us to create as many files and directories as we want. We can create files under the existing directories or create new directories.
System Directories
System directories contain files, software, applications, and scripts required to run and maintain the system. The installation process automatically makes them when we install the operating system.
The following image shows essential system directories on Linux.

Linux Directory Structure (File System Structure)
| Directory | Description |
| / | This is the first directory in the Linux file system. It is also known as the root directory or the primary directory. All files and directories are created and managed under this directory. |
| /home | This is the default directory for user data. Whenever we add a new user, Linux automatically creates a home directory matching with his username in this directory. Linux puts the user in his home directory just after the login. |
| /root | This is the root user's home directory. The root user is the superuser in Linux. For security reasons, Linux creates a separate home directory for the root user. |
| /bin | This directory contains standard command files. Commands stored in this directory are available for all users and do not require special permission. |
| /sbin | This directory contains system administration command files. Commands stored in this directory are available only for super users and require special privileges. |
| /usr | This directory contains user application software files, third-party software and scripts, document files, and libraries for programming languages. |
| /var | This directory stores variable data files such as printing jobs and mailboxes. |
| /etc | This directory contains system configuration files. |
| /boot | This directory contains Linux boot loader files. |
| /mnt | This directory provides a mount point to mount the remote file system and temporary devices such as CD, DVD, and USB. |
| /dev | This directory contains device files. The system automatically generates or removes these files when adding or removing devices. |
| /tmp | This directory provides a temporary location for applications. |
Linux File Naming Convention
Linux uses a flexible naming convention. We can use any number or letter in a file name. We can also use an underscore, space, period, and comma. Some special characters, such as a question mark, asterisk, and slash, are not allowed in a file name. Linux reserves these characters for shell functions. File extensions are not compulsory in Linux. Based on our requirements, we can use or skip them.
Key points
- A file name can contain any character or number.
- The maximum length for a file name is 256 characters.
- A file name can use a space, underscore, minus, period, and comma.
- A file name cannot use a question mark, asterisk, and slash.
- A file extension is not compulsory. We can create a file with or without an extension.
- A file whose name starts with a period (.) is treated as a hidden file.
- We can use a space in the file name. However, if we do that, we must use quotes with the name at the command prompt.
Conclusion
Operating systems use different naming conventions for file names. This tutorial explained the name convention Linux uses. It also provides a brief description of essential system directories.
By ComputerNetworkingNotes Updated on 2026-02-27