Day 2 of Linux for DevOps Engineers — Understanding Linux Folder Structure (The Foundation of Linux Systems)

Day 2 of Linux for DevOps Engineers — Understanding Linux Folder Structure (The Foundation of Linux Systems)

Today in my Linux Zero to Hero series, we covered one of the most important and foundational concepts for DevOps Engineers, Developers, and System Administrators: the Linux File System Structure.

When you log into any Linux server, whether it’s on your laptop, an AWS EC2 instance, or a production environment, the very first thing you encounter is the folder structure of the file system. Understanding where things are located is crucial for troubleshooting, automation, and security.

What We Covered Today in Detail:


1. How We Accessed Linux:

  • Used a Docker container on my Windows machine to simulate a Linux environment.
  • Also demonstrated how to use an AWS EC2 instance for practice.
  • Explained the Linux login prompt:

root@ubuntu:/#        

  • root → current user (administrator)
  • ubuntu → system hostname
  • / → current directory (root of the file system)


2. Why Linux Folder Structure Matters:

  1. Every Linux machine is built on a file system hierarchy starting from /.
  2. All files and folders live under this single root (/) directory.
  3. Each directory serves a specific role. Knowing these roles helps you:

Find configuration files

  1. Locate log files
  2. Understand where apps and scripts should be placed
  3. Manage users and data securely


3. Exploring the Important Directories:

System Binaries and Commands

Directory Purpose Example Commands

/bin Basic commands for all users ls, mkdir, cat


/sbin Admin-only system commands useradd, shutdown, mount


/usr/bin Additional user binaries python3, vim, grep


/usr/sbin Additional system binaries service, sshd, iptables



Configuration, Boot & Runtime


Directory Purpose


/etc System configuration files (e.g., user passwords, network settings)


/boot Bootloader files needed to start Linux


/run Temporary runtime data for active processes


/var/log Logs generated by Linux and installed applications



User Home and Data Folders


Directory Purpose


/home/username/ Each user’s personal folder (e.g., /home/ubuntu/)


/root/ Home folder for the root user


/opt/ Optional software and third-party apps


/srv/ Service-related files (e.g., for web servers)


/data/ Custom data folders used within the organization



Mount Points & Temp


Directory Purpose


/mnt/ Temporary mount points for additional disks


/media/ Mount points for external media (USB, CD-ROM)


/tmp/ Temporary files (auto-cleared by the OS)


Virtual and Device Filesystems

Directory Purpose


/dev/ Device files (hard drives, USBs, etc.)


/proc/ Virtual filesystem for system processes


/sys/ Kernel-related information and device interfaces


4. A Very Important Directory: /etc/

This is where the most critical configuration files live, such as:

  • /etc/passwd → List of system users
  • /etc/hosts → Local DNS resolution
  • /etc/os-release → Linux distribution version details


5. The PATH Environment Variable: How Commands Are Found

When you type ls, you don’t write /usr/bin/ls.

Linux knows where to look because of the PATH variable, which lists the directories containing executable binaries.

echo $PATH        
output :
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin        

If a command exists in one of these paths, the OS can run it.


Why DevOps Engineers Need This Knowledge:

  • Troubleshooting: Know where logs and configs are.
  • Automation: Write scripts that correctly reference system files.
  • Security: Manage access to critical system folders.
  • Efficiency: Avoid wasting time searching for files.


Next in Day 3: User Management in Linux

You'll learn how to add users, manage groups, and set permissions securely — core skills for any Linux admin or DevOps role.


#Linux #DevOps #CloudEngineering #Infrastructure #Automation #ZeroToHero #SysAdmin #LinuxTraining #LinuxForDevOps #CareerGrowth #LearningInPublic #jobs

To view or add a comment, sign in

More articles by Mahendra R

Others also viewed

Explore content categories