Linux File System Basics: A Beginner’s Guide to Linux Directories & Structure

Published On: September 24, 2025
Follow Us
Linux File System Basics

Introduction

If you’re new to Linux or planning to dive deeper into the Linux ecosystem, understanding the Linux file system is crucial. Unlike Windows, Linux organizes files and directories differently, with a unique hierarchy and naming conventions.

In this article, we’ll break down the Linux file system basics, explain common directories, file types, and permissions, and help you get comfortable navigating your Linux system.

📁 What is the Linux File System?

The Linux file system is a hierarchical structure that organizes data, files, and directories in a tree-like format starting from a single root directory denoted by /. Unlike Windows drives (like C:\ or D:\), Linux uses one unified directory tree.

🌲 Linux Directory Structure Overview

The root directory / contains all files and directories. Here are the most important top-level directories you’ll encounter:


🔍 Understanding Key Directories

  • /home: This is where user data lives. Each user gets a folder here (/home/username) for personal files and settings.
  • /etc: Contains system-wide configuration files, such as network settings, user permissions, and services.
  • /bin & /usr/bin: Where executable programs and commands reside. For example, common commands like ls, cp, mv are stored here.
  • /dev: Special files representing hardware devices like hard drives, USBs, and printers.
  • /proc: A virtual file system displaying kernel and process info dynamically.

📄 Linux File Types

Linux files are not just plain files; they come in several types:

File TypeDescription
Regular fileText files, executables, documents
DirectoryFolder that contains files and other directories
Symbolic linkShortcut or reference to another file
Character deviceHardware devices like keyboard, mouse
Block deviceDevices that transfer data in blocks (e.g., hard disks)
SocketUsed for network communication
FIFO (named pipe)Used for inter-process communication

You can see a file’s type using the ls -l command in the terminal, where the first character indicates the type (- for regular, d for directory, l for symlink).

🔐 File Permissions Basics

Linux has a powerful permission system to control who can read (r), write (w), or execute (x) files.

Permissions are assigned to three groups:

  • User (u) – Owner of the file
  • Group (g) – Group associated with the file
  • Others (o) – Everyone else

You can view permissions with ls -l, which shows something like this:

-rwxr-xr--
  • The first character indicates the file type (- regular file, d directory).
  • The next nine characters represent permissions for user, group, and others in sets of three (rwx).

📌 Basic Commands to Navigate Linux File System

  • ls – List directory contents
  • cd <directory> – Change directory
  • pwd – Print current directory
  • mkdir <directory> – Create a new directory
  • touch <file> – Create an empty file
  • rm <file> – Remove a file
  • rmdir <directory> – Remove an empty directory
  • cp <source> <destination> – Copy files or directories
  • mv <source> <destination> – Move or rename files/directories

💡 Tips for Exploring the Linux File System

  • Use tree command (install with sudo apt install tree) for a visual directory tree.
  • Learn to use find to locate files: find /home -name "*.txt"
  • Use du -h to check disk usage by directory.

🔚 Conclusion

The Linux file system may seem complex at first, but once you understand the root structure, key directories, file types, and permissions, navigating and managing your system becomes intuitive and powerful.

Getting comfortable with Linux file system basics is an essential skill whether you’re a developer, sysadmin, or Linux enthusiast.

sapan singh

👨‍💻 About Sapan Singh Hi, I’m Sapan Singh — a passionate software developer with a strong love for technology, gaming, and building useful digital tools.

Join WhatsApp

Join Now

Join Telegram

Join Now

Leave a Comment