Tutorials : Linux file system in 2026
Welcome to the Linux file system! If you are coming from Windows, the biggest shift is moving away from the concept of "drives" (like C: or D:). In Linux, everything is a file, and everything hangs off a single root.
Here is your quick-start guide to understanding and navigating the Linux file system.
1. The Directory Tree Structure
The Linux file system is structured like an inverted tree. At the very top is the Root Directory, represented by a single forward slash (/). Every other directory and file branches out from here.
Here are the most important directories you need to know:
/(Root): The starting point of the tree. Every single file and directory starts here./home: The user kingdom. If your username isalex, your personal files, desktop, and downloads live in/home/alex./root: The home directory for the superuser (Administrator). Separate from regular user homes./bin&/sbin: Essential command binaries (programs) needed for the system to run.sbinis mostly for system administration commands./etc: The configuration central. Almost all system-wide configuration files (like network settings, user lists, etc.) live here./var: Variable data. This is where files that constantly change live, such as system logs (/var/log) and databases./tmp: Temporary files. Files created here are usually deleted when the system reboots./media&/mnt: Where external devices (like USB drives or external hard drives) are attached ("mounted") to the system.
2. Pathnames: Absolute vs. Relative
To find a file, you need to tell Linux its path. There are two ways to do this:
Absolute Paths
An absolute path is the full address to a file, always starting from the root (/).
Example:
/home/alex/Documents/report.txt
Relative Paths
A relative path is the address relative to where you are currently standing in the system. It never starts with a /.
.(Single dot) represents your current directory...(Double dot) represents the parent directory (one level up).
Example: If you are already in
/home/alex/, the relative path to your report is justDocuments/report.txt.
3. Essential Navigation Commands
To move around this tree, you only need a handful of core terminal commands:
| Command | What it stands for | What it does | Example |
pwd | Print Working Directory | Shows you exactly where you are right now. | pwd |
ls | List | Shows you the files and folders in your current directory. | ls -la (shows detailed & hidden files) |
cd | Change Directory | Moves you to a new directory. | cd /etc or cd .. (go up one level) |
mkdir | Make Directory | Creates a new folder. | mkdir NewFolder |
touch | Touch | Creates an empty file. | touch notes.txt |
4. Crucial Concept: Hidden Files and ~
The Tilde (
~): This is a shortcut symbol that always represents your home directory. Typingcd ~will instantly take you back to/home/yourusername.Hidden Files: In Linux, any file or folder that starts with a period (
.) is hidden. For example,.bashrcor.config. You won't see them with a normallscommand; you have to usels -a(list all) to reveal them.Books :
Introduction to Linux
This is a book about Linux file system : The Linux File System

Comments
Post a Comment