<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: lalith_charan</title>
    <description>The latest articles on DEV Community by lalith_charan (@lalith_charan).</description>
    <link>https://dev.to/lalith_charan</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2505871%2F63185f4d-a636-405c-a7f6-3b2c7c2e79db.jpg</url>
      <title>DEV Community: lalith_charan</title>
      <link>https://dev.to/lalith_charan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lalith_charan"/>
    <language>en</language>
    <item>
      <title>🐳 Mastering Dockerfile: A Complete Beginner’s Guide to Building Containers</title>
      <dc:creator>lalith_charan</dc:creator>
      <pubDate>Sat, 13 Sep 2025 18:23:21 +0000</pubDate>
      <link>https://dev.to/lalith_charan/mastering-dockerfile-a-complete-beginners-guide-to-building-containers-2368</link>
      <guid>https://dev.to/lalith_charan/mastering-dockerfile-a-complete-beginners-guide-to-building-containers-2368</guid>
      <description>&lt;h1&gt;
  
  
  🐳 Mastering the Dockerfile: The Complete Beginner’s Guide
&lt;/h1&gt;

&lt;p&gt;Docker is one of the most essential tools in DevOps and cloud-native development. At the heart of Docker is the &lt;strong&gt;Dockerfile&lt;/strong&gt; — a simple text file with instructions to build a Docker image.  &lt;/p&gt;

&lt;p&gt;This guide will walk you through everything you need to know about Dockerfiles, from basics to best practices.  &lt;/p&gt;




&lt;h2&gt;
  
  
  📦 What is a Dockerfile?
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;Dockerfile&lt;/strong&gt; is like a recipe 🧑‍🍳.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Each line is an &lt;strong&gt;instruction&lt;/strong&gt;.
&lt;/li&gt;
&lt;li&gt;Docker processes it &lt;strong&gt;top to bottom&lt;/strong&gt;.
&lt;/li&gt;
&lt;li&gt;The result is a &lt;strong&gt;Docker image&lt;/strong&gt;, which you can run as a &lt;strong&gt;container&lt;/strong&gt;.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Flow:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
Dockerfile ➝ Docker Image ➝ Container

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🛠️ Basic Structure of a Dockerfile
&lt;/h2&gt;

&lt;p&gt;Here’s a template:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="s"&gt; &amp;lt;base-image&amp;gt;&lt;/span&gt;
&lt;span class="k"&gt;WORKDIR&lt;/span&gt;&lt;span class="s"&gt; &amp;lt;directory&amp;gt;&lt;/span&gt;
&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; &amp;lt;src&amp;gt; &amp;lt;dest&amp;gt;&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;&amp;lt;&lt;span class="nb"&gt;command&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="k"&gt;CMD&lt;/span&gt;&lt;span class="s"&gt; ["executable", "param1", "param2"]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🔑 Key Instructions Explained
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. &lt;code&gt;FROM&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Sets the &lt;strong&gt;base image&lt;/strong&gt; to start with.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="s"&gt; python:3.9-slim&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 Every Dockerfile must start with a base image (unless you’re building completely from scratch).&lt;/p&gt;




&lt;h3&gt;
  
  
  2. &lt;code&gt;WORKDIR&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Defines the working directory inside the container.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="k"&gt;WORKDIR&lt;/span&gt;&lt;span class="s"&gt; /app&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  3. &lt;code&gt;COPY&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Copies files from your local machine into the container.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; requirements.txt .&lt;/span&gt;
&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; . .&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  4. &lt;code&gt;RUN&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Executes commands &lt;strong&gt;at build time&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="k"&gt;RUN &lt;/span&gt;pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; requirements.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  5. &lt;code&gt;CMD&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Specifies the &lt;strong&gt;default command&lt;/strong&gt; to run when the container starts.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="k"&gt;CMD&lt;/span&gt;&lt;span class="s"&gt; ["python", "app.py"]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  6. &lt;code&gt;ENTRYPOINT&lt;/code&gt; (advanced)
&lt;/h3&gt;

&lt;p&gt;Defines the main process of the container. Unlike &lt;code&gt;CMD&lt;/code&gt;, it &lt;strong&gt;cannot be overridden easily&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="k"&gt;ENTRYPOINT&lt;/span&gt;&lt;span class="s"&gt; ["python"]&lt;/span&gt;
&lt;span class="k"&gt;CMD&lt;/span&gt;&lt;span class="s"&gt; ["app.py"]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 This runs as &lt;code&gt;python app.py&lt;/code&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  7. &lt;code&gt;EXPOSE&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Documents which ports the container will use.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="k"&gt;EXPOSE&lt;/span&gt;&lt;span class="s"&gt; 5000&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  8. &lt;code&gt;ENV&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Sets environment variables.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="k"&gt;ENV&lt;/span&gt;&lt;span class="s"&gt; APP_ENV=production&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  9. &lt;code&gt;ARG&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Sets build-time variables.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="k"&gt;ARG&lt;/span&gt;&lt;span class="s"&gt; VERSION=1.0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  📄 Full Example: Python Flask App
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="c"&gt;# Step 1: Start from base image&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="s"&gt; python:3.9-slim&lt;/span&gt;

&lt;span class="c"&gt;# Step 2: Set working directory&lt;/span&gt;
&lt;span class="k"&gt;WORKDIR&lt;/span&gt;&lt;span class="s"&gt; /app&lt;/span&gt;

&lt;span class="c"&gt;# Step 3: Copy requirements and install dependencies&lt;/span&gt;
&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; requirements.txt .&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--no-cache-dir&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; requirements.txt

&lt;span class="c"&gt;# Step 4: Copy the rest of the code&lt;/span&gt;
&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; . .&lt;/span&gt;

&lt;span class="c"&gt;# Step 5: Expose port&lt;/span&gt;
&lt;span class="k"&gt;EXPOSE&lt;/span&gt;&lt;span class="s"&gt; 5000&lt;/span&gt;

&lt;span class="c"&gt;# Step 6: Default command&lt;/span&gt;
&lt;span class="k"&gt;CMD&lt;/span&gt;&lt;span class="s"&gt; ["python", "app.py"]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  ⚡ Build and Run
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Build the image&lt;/span&gt;
docker build &lt;span class="nt"&gt;-t&lt;/span&gt; myapp:1.0 &lt;span class="nb"&gt;.&lt;/span&gt;

&lt;span class="c"&gt;# Run the container&lt;/span&gt;
docker run &lt;span class="nt"&gt;-p&lt;/span&gt; 5000:5000 myapp:1.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now open 👉 &lt;code&gt;http://localhost:5000&lt;/code&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  📸 Visual Overview
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Dockerfile ➝ Image ➝ Container&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5icvd23q5ukxpyiu8nnd.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5icvd23q5ukxpyiu8nnd.jpg" alt="Docker Build Process" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  ✅ Best Practices
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Use &lt;strong&gt;lightweight base images&lt;/strong&gt; (e.g., &lt;code&gt;alpine&lt;/code&gt;, &lt;code&gt;slim&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Always use a &lt;strong&gt;.dockerignore&lt;/strong&gt; file to avoid copying unnecessary files.&lt;/li&gt;
&lt;li&gt;Combine commands to reduce layers:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;  RUN apt-get update &amp;amp;&amp;amp; apt-get install -y curl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Pin versions of dependencies for reproducibility.&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;multi-stage builds&lt;/strong&gt; to keep images small:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;  FROM golang:1.18 as builder
  WORKDIR /src
  COPY . .
  RUN go build -o app

  FROM alpine:3.16
  COPY --from=builder /src/app /app
  CMD ["/app"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🚀 Wrap-up
&lt;/h2&gt;

&lt;p&gt;A Dockerfile is the &lt;strong&gt;blueprint&lt;/strong&gt; of your containerized application.&lt;br&gt;
With a few simple instructions, you can package your code and run it anywhere.&lt;/p&gt;

&lt;p&gt;In upcoming posts, we’ll explore &lt;strong&gt;multi-stage builds, caching, and security best practices&lt;/strong&gt; for Dockerfiles.&lt;/p&gt;




&lt;p&gt;💡 &lt;strong&gt;Question for you:&lt;/strong&gt;&lt;br&gt;
👉 What’s the most challenging part you faced when writing your first Dockerfile?&lt;/p&gt;

&lt;p&gt;Drop your thoughts in the comments 👇&lt;/p&gt;

</description>
      <category>devops</category>
      <category>docker</category>
      <category>dockerfile</category>
      <category>containers</category>
    </item>
    <item>
      <title>Understanding the Linux Filesystem: An In-Depth Guide for DevOps Engineers</title>
      <dc:creator>lalith_charan</dc:creator>
      <pubDate>Sun, 01 Dec 2024 05:07:17 +0000</pubDate>
      <link>https://dev.to/lalith_charan/understanding-the-linux-filesystem-an-in-depth-guide-for-devops-engineers-53cc</link>
      <guid>https://dev.to/lalith_charan/understanding-the-linux-filesystem-an-in-depth-guide-for-devops-engineers-53cc</guid>
      <description>&lt;h2&gt;
  
  
  📂 The Linux Filesystem: A Complete Guide for DevOps Engineers
&lt;/h2&gt;

&lt;p&gt;The Linux filesystem is the foundation of any Linux-based operating system. It dictates how files are stored, organized, and accessed. Understanding this system is crucial for any DevOps engineer, as it influences everything from system performance to security and deployment processes.  &lt;/p&gt;

&lt;p&gt;This article aims to provide a comprehensive guide to the Linux filesystem, breaking down its structure, key concepts, and practical applications.&lt;/p&gt;




&lt;h2&gt;
  
  
  📑 Table of Contents
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
Introduction to the Linux Filesystem
&lt;/li&gt;
&lt;li&gt;
Filesystem Hierarchy Standard (FHS)
&lt;/li&gt;
&lt;li&gt;
Key Filesystem Types in Linux
&lt;/li&gt;
&lt;li&gt;
Understanding Inodes
&lt;/li&gt;
&lt;li&gt;
Important Directories and Their Purposes
&lt;/li&gt;
&lt;li&gt;
File Permissions and Ownership
&lt;/li&gt;
&lt;li&gt;
Mounting and Unmounting Filesystems
&lt;/li&gt;
&lt;li&gt;
Special Files and Virtual Filesystems
&lt;/li&gt;
&lt;li&gt;
Practical Tips for Managing the Linux Filesystem
&lt;/li&gt;
&lt;li&gt;
Conclusion
&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  1. Introduction to the Linux Filesystem
&lt;/h2&gt;

&lt;p&gt;At its core, the Linux filesystem is a way of organizing data and files on a storage device. Unlike operating systems like Windows, Linux treats &lt;strong&gt;everything as a file&lt;/strong&gt;—whether it's a directory, a hardware device, or even an active process.  &lt;/p&gt;

&lt;p&gt;This unified approach simplifies interactions and makes the system highly flexible.  &lt;/p&gt;

&lt;p&gt;The Linux filesystem is &lt;strong&gt;hierarchical&lt;/strong&gt;, meaning it has a &lt;strong&gt;root directory (&lt;code&gt;/&lt;/code&gt;)&lt;/strong&gt; from which all other files and directories branch out, forming a tree-like structure.  &lt;/p&gt;




&lt;h2&gt;
  
  
  2. Filesystem Hierarchy Standard (FHS)
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;Filesystem Hierarchy Standard (FHS)&lt;/strong&gt; defines the directory structure and directory contents in Linux systems.  &lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;root directory &lt;code&gt;/&lt;/code&gt;&lt;/strong&gt; serves as the starting point of the filesystem. Key subdirectories include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;/bin&lt;/code&gt; → Essential command binaries (&lt;code&gt;ls&lt;/code&gt;, &lt;code&gt;cp&lt;/code&gt;, &lt;code&gt;mv&lt;/code&gt;)
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/boot&lt;/code&gt; → Bootloader files, including the kernel
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/dev&lt;/code&gt; → Device files representing hardware components
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/etc&lt;/code&gt; → System configuration files
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/home&lt;/code&gt; → User home directories
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/lib&lt;/code&gt; → Shared libraries
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/mnt&lt;/code&gt; → Temporary mount points
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/opt&lt;/code&gt; → Optional software packages
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/proc&lt;/code&gt; → Virtual filesystem (process &amp;amp; kernel info)
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/root&lt;/code&gt; → Root user’s home directory
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/sbin&lt;/code&gt; → System binaries for administration
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/tmp&lt;/code&gt; → Temporary files
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/usr&lt;/code&gt; → Secondary hierarchy for user programs/data
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/var&lt;/code&gt; → Variable files (logs, databases, email)
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  3. Key Filesystem Types in Linux
&lt;/h2&gt;

&lt;p&gt;Linux supports multiple filesystem types, each suited for different scenarios:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ext4&lt;/strong&gt; → Most widely used, reliable, balanced performance
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;XFS&lt;/strong&gt; → High-performance, scalable (common in enterprise)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Btrfs&lt;/strong&gt; → Fault-tolerant, snapshots, easy admin
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ZFS&lt;/strong&gt; → Integrity, replication, storage-heavy use cases
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;vfat&lt;/strong&gt; → FAT compatibility, USB/external drives
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;NFS&lt;/strong&gt; → Network File System, file sharing over network
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  4. Understanding Inodes
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Inodes&lt;/strong&gt; are data structures that store &lt;strong&gt;metadata about files&lt;/strong&gt;.  &lt;/p&gt;

&lt;p&gt;Each file/directory is linked to an inode that contains:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;File size
&lt;/li&gt;
&lt;li&gt;File permissions
&lt;/li&gt;
&lt;li&gt;Ownership (user/group)
&lt;/li&gt;
&lt;li&gt;Timestamps (last access/modify/change)
&lt;/li&gt;
&lt;li&gt;File type
&lt;/li&gt;
&lt;li&gt;Number of hard links
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;⚠️ Note: Inodes do &lt;strong&gt;not&lt;/strong&gt; store filenames. Directories map filenames → inode numbers.  &lt;/p&gt;




&lt;h2&gt;
  
  
  5. Important Directories and Their Purposes
&lt;/h2&gt;

&lt;p&gt;Here’s a quick breakdown of some critical directories:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;/&lt;/code&gt; → Root directory (starting point)
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/bin&lt;/code&gt; → User binaries (basic commands)
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/sbin&lt;/code&gt; → System binaries (admin tasks)
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/lib&lt;/code&gt; → Shared libraries for &lt;code&gt;/bin&lt;/code&gt; &amp;amp; &lt;code&gt;/sbin&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/usr&lt;/code&gt; → User applications, libraries, docs
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/var&lt;/code&gt; → Logs, caches, variable data
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/etc&lt;/code&gt; → Config files for system &amp;amp; apps
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/home&lt;/code&gt; → User personal directories
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/proc&lt;/code&gt; → Virtual filesystem for kernel &amp;amp; process info
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/dev&lt;/code&gt; → Device files (represent hardware)
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  6. File Permissions and Ownership
&lt;/h2&gt;

&lt;p&gt;Linux permissions control file access:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Read (r)&lt;/strong&gt; → View file contents
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Write (w)&lt;/strong&gt; → Modify file
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Execute (x)&lt;/strong&gt; → Run file as program
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;rwxr-xr--
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Owner → Read, write, execute
&lt;/li&gt;
&lt;li&gt;Group → Read, execute
&lt;/li&gt;
&lt;li&gt;Others → Read only
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  7. Mounting and Unmounting Filesystems
&lt;/h2&gt;

&lt;p&gt;Mounting attaches a filesystem to the Linux directory tree.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Commands:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Mount a partition&lt;/span&gt;
mount /dev/sdb1 /mnt

&lt;span class="c"&gt;# Unmount&lt;/span&gt;
umount /mnt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;⚠️ Always unmount properly to prevent data corruption.&lt;/p&gt;




&lt;h2&gt;
  
  
  8. Special Files and Virtual Filesystems
&lt;/h2&gt;

&lt;p&gt;Linux treats &lt;strong&gt;everything as a file&lt;/strong&gt;, including devices:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Character devices&lt;/strong&gt; → sequential access (&lt;code&gt;/dev/tty&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Block devices&lt;/strong&gt; → random access (&lt;code&gt;/dev/sda&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pipes&lt;/strong&gt; → IPC (&lt;code&gt;/dev/fd/&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sockets&lt;/strong&gt; → networking (&lt;code&gt;/dev/log&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Virtual filesystems include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;/proc&lt;/code&gt; → process &amp;amp; kernel info&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/sys&lt;/code&gt; → kernel objects&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  9. Practical Tips for Managing the Linux Filesystem
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Check disk usage&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;df&lt;/span&gt; &lt;span class="nt"&gt;-h&lt;/span&gt;
&lt;span class="nb"&gt;du&lt;/span&gt; &lt;span class="nt"&gt;-sh&lt;/span&gt; /var/log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Clean old logs&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;logrotate /etc/logrotate.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Set disk quotas&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;setquota &lt;span class="nt"&gt;-u&lt;/span&gt; username 10000 12000 0 0 /dev/sda1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Backups&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;rsync &lt;span class="nt"&gt;-avz&lt;/span&gt; /home/user /backup/user
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Check filesystem integrity&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;fsck /dev/sda1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  10. Conclusion
&lt;/h2&gt;

&lt;p&gt;The Linux filesystem is the &lt;strong&gt;backbone of every Linux system&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For DevOps engineers, mastering it enables you to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Troubleshoot performance issues&lt;/li&gt;
&lt;li&gt;Secure systems with correct permissions&lt;/li&gt;
&lt;li&gt;Manage storage effectively&lt;/li&gt;
&lt;li&gt;Automate tasks confidently&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By understanding these concepts, you’ll become a more &lt;strong&gt;proficient and versatile DevOps engineer&lt;/strong&gt;. 🚀&lt;/p&gt;




</description>
      <category>devops</category>
      <category>linux</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
