<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Linux file system]]></title><description><![CDATA[Linux file system]]></description><link>https://file-system-of-linux.hashnode.dev</link><image><url>https://cdn.hashnode.com/res/hashnode/image/upload/v1593680282896/kNC7E8IR4.png</url><title>Linux file system</title><link>https://file-system-of-linux.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Thu, 18 Jun 2026 06:14:33 GMT</lastBuildDate><atom:link href="https://file-system-of-linux.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Linux File System Hunting]]></title><description><![CDATA[When we first learn Linux, we usually interact with commands like ls, cd, and mkdir. But after spending time exploring the file system deeply, I realized something fascinating:

Linux is not just an o]]></description><link>https://file-system-of-linux.hashnode.dev/linux-file-system-hunting</link><guid isPermaLink="true">https://file-system-of-linux.hashnode.dev/linux-file-system-hunting</guid><category><![CDATA[linux-file-system]]></category><category><![CDATA[Linux File System and Permissions]]></category><category><![CDATA[Linux Overview]]></category><category><![CDATA[linux-beyond the basics]]></category><category><![CDATA[linux file system arhitecture]]></category><category><![CDATA[ChaiCode]]></category><category><![CDATA[Chaiaurcode]]></category><category><![CDATA[@hiteshchoudharylco]]></category><category><![CDATA[#piyushgarag]]></category><dc:creator><![CDATA[Ritu Sood]]></dc:creator><pubDate>Wed, 22 Apr 2026 01:35:47 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/696e5fe3e1b3dda793831d69/6d6bc5e0-8f94-47ab-aa3c-f4bf40b1a27a.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When we first learn Linux, we usually interact with commands like <code>ls</code>, <code>cd</code>, and <code>mkdir</code>. But after spending time exploring the file system deeply, I realized something fascinating:</p>
<blockquote>
<p>Linux is not just an operating system — it is a transparent machine where almost everything is exposed as files.</p>
</blockquote>
<p>This exploration was less about navigation and more about understanding <strong>how Linux thinks internally</strong>.</p>
<p>I approached this assignment like a <strong>system investigator</strong>, tracing how the OS manages users, networking, booting, processes, permissions, and devices through its file system.</p>
<p>What I discovered completely changed the way I look at Linux.</p>
<hr />
<h2>1. <code>/etc</code> — The Control Room of Linux</h2>
<p>The first place I explored was <code>/etc</code>.</p>
<p>At first glance, it looks like just another directory.<br />But this is actually the <strong>central control room of the system</strong>.</p>
<p>This directory contains configuration files that define how the entire operating system behaves.</p>
<p>Some important files I found:</p>
<ul>
<li><p><code>/etc/hosts</code></p>
</li>
<li><p><code>/etc/resolv.conf</code></p>
</li>
<li><p><code>/etc/passwd</code></p>
</li>
<li><p><code>/etc/fstab</code></p>
</li>
<li><p><code>/etc/systemd/</code></p>
</li>
</ul>
<h3>Why it exists</h3>
<p>Linux separates <strong>configuration from executable code</strong>.</p>
<p>This means applications and system services do not need to be rewritten when behavior changes.</p>
<p>For example:</p>
<ul>
<li><p>changing hostname</p>
</li>
<li><p>changing DNS</p>
</li>
<li><p>mounting disks</p>
</li>
<li><p>configuring services</p>
</li>
</ul>
<p>all happen through configuration files.</p>
<h3>What problem it solves</h3>
<p>It makes Linux <strong>extremely modular and configurable</strong>.</p>
<p>Instead of editing binaries, admins simply update text files.</p>
<h3>Key insight</h3>
<p>This was my first major realization:</p>
<blockquote>
<p>Linux prefers text-based control over hidden settings panels.</p>
</blockquote>
<p>This design makes debugging and automation far easier.</p>
<h2>2. DNS Resolution — How</h2>
<h2>Linux Finds the Internet</h2>
<p>One of the most interesting discoveries was <code>/etc/resolv.conf</code>.</p>
<p>This file controls how domain names are converted into IP addresses.</p>
<p>For example:</p>
<pre><code class="language-plaintext">nameserver 8.8.8.8
</code></pre>
<p>This tells Linux which DNS server to query.</p>
<h3>Why it exists</h3>
<p>Humans remember names like <a href="http://google.com"><code>google.com</code></a>, not IP addresses.</p>
<p>The system needs a resolver mechanism.</p>
<h3>What problem it solves</h3>
<p>Without this file, internet access through domain names would fail.</p>
<h3>Deep insight</h3>
<p>What fascinated me was that this file is often auto-generated by:</p>
<ul>
<li><p>NetworkManager</p>
</li>
<li><p>DHCP client</p>
</li>
<li><p>systemd-resolved</p>
</li>
</ul>
<p>This means Linux networking is <strong>dynamic, not static</strong>.</p>
<p>Even something as simple as opening a website depends on this tiny file.</p>
<hr />
<h2>3. Routing Logic Hidden in <code>/proc/net/route</code></h2>
<p>This was one of my favorite discoveries.</p>
<p>Instead of storing routing info in a traditional config file, Linux exposes it through:</p>
<pre><code class="language-plaintext">/proc/net/route
</code></pre>
<p>This file shows how packets travel outside the machine.</p>
<h3>Why it exists</h3>
<p>The kernel needs routing decisions for:</p>
<ul>
<li><p>local network traffic</p>
</li>
<li><p>internet traffic</p>
</li>
<li><p>gateway selection</p>
</li>
</ul>
<h3>What problem it solves</h3>
<p>Without routing rules, the OS would not know where to send packets.</p>
<h3>Deep insight</h3>
<p>This made me understand that:</p>
<blockquote>
<p>Networking decisions are visible through the filesystem itself.</p>
</blockquote>
<p>That’s an incredible design principle.</p>
<p>Linux literally lets you inspect kernel routing logic as if reading a text file.</p>
<hr />
<h2>4. <code>/var/log</code> — The Memory of the Operating System</h2>
<p>If <code>/etc</code> is the brain, then <code>/var/log</code> is the memory.</p>
<p>This folder records everything important happening in the system.</p>
<p>Examples I explored:</p>
<ul>
<li><p><code>/var/log/syslog</code></p>
</li>
<li><p><code>/var/log/auth.log</code></p>
</li>
<li><p><code>/var/log/kern.log</code></p>
</li>
</ul>
<h3>Why it exists</h3>
<p>Systems need observability.</p>
<h3>What problem it solves</h3>
<p>It helps diagnose:</p>
<ul>
<li><p>login failures</p>
</li>
<li><p>service crashes</p>
</li>
<li><p>kernel errors</p>
</li>
<li><p>suspicious activity</p>
</li>
</ul>
<h3>Deep insight</h3>
<p>Reading logs felt like reading the <strong>story of the machine</strong>.</p>
<p>For example, authentication logs reveal failed login attempts.</p>
<p>This is critical for security investigations.</p>
<hr />
<h2>5. User Identity — <code>/etc/passwd</code> and <code>/etc/shadow</code></h2>
<p>This discovery helped me understand Linux security deeply.</p>
<h3><code>/etc/passwd</code></h3>
<p>Stores:</p>
<ul>
<li><p>username</p>
</li>
<li><p>UID</p>
</li>
<li><p>GID</p>
</li>
<li><p>home directory</p>
</li>
<li><p>shell</p>
</li>
</ul>
<p>Example:</p>
<pre><code class="language-plaintext">ritu:x:1000:1000:/home/ritu:/bin/bash
</code></pre>
<h3><code>/etc/shadow</code></h3>
<p>Stores encrypted password hashes.</p>
<h3>Why it exists</h3>
<p>Linux separates public identity data from sensitive secrets.</p>
<h3>What problem it solves</h3>
<p>Protects passwords from normal users.</p>
<h3>Deep insight</h3>
<p>This separation is a brilliant security design.</p>
<p>Even if someone can read user metadata, they cannot access password hashes without elevated privileges.</p>
<hr />
<h2>6. Permission Model -Linux’s Core Security Layer</h2>
<p>This was one of the most powerful concepts I explored.</p>
<p>Every file in Linux has permissions like:</p>
<pre><code class="language-plaintext">-rwxr-xr--
</code></pre>
<p>This defines access for:</p>
<ul>
<li><p>owner</p>
</li>
<li><p>group</p>
</li>
<li><p>others</p>
</li>
</ul>
<h3>Why it exists</h3>
<p>Linux is built as a multi-user operating system.</p>
<h3>What problem it solves</h3>
<p>Prevents unauthorized access.</p>
<h3>Deep insight</h3>
<p>I learned that many security issues happen because of wrong permissions.</p>
<p>Sometimes the OS is secure, but human configuration mistakes make it vulnerable.</p>
<p>This made permissions feel less like syntax and more like <strong>security architecture</strong>.</p>
<hr />
<h2>7. <code>/proc</code> — A Window into Live System Internals</h2>
<p>This was the most fascinating part of my exploration.</p>
<p>The <code>/proc</code> directory is not stored on disk.</p>
<p>It is a <strong>virtual filesystem generated by the kernel in real time</strong>.</p>
<p>Examples:</p>
<ul>
<li><p><code>/proc/cpuinfo</code></p>
</li>
<li><p><code>/proc/meminfo</code></p>
</li>
<li><p><code>/proc/uptime</code></p>
</li>
<li><p><code>/proc/&lt;pid&gt;/</code></p>
</li>
</ul>
<h3>Why it exists</h3>
<p>Provides visibility into kernel state and processes.</p>
<h3>What problem it solves</h3>
<p>Makes system introspection easy.</p>
<h3>Deep insight</h3>
<p>This changed my understanding completely.</p>
<blockquote>
<p>Linux exposes running processes as directories.</p>
</blockquote>
<p>Every process becomes inspectable.</p>
<p>For example:</p>
<pre><code class="language-plaintext">/proc/1234/
</code></pre>
<p>contains:</p>
<ul>
<li><p>open files</p>
</li>
<li><p>environment variables</p>
</li>
<li><p>memory maps</p>
</li>
<li><p>execution status</p>
</li>
</ul>
<p>This is system transparency at its best.</p>
<hr />
<h2>8. <code>/dev</code> — Hardware as Files</h2>
<p>Linux treats hardware as files.</p>
<p>This is one of its most elegant design philosophies.</p>
<p>Examples:</p>
<ul>
<li><p><code>/dev/sda</code> → disk</p>
</li>
<li><p><code>/dev/tty</code> → terminal</p>
</li>
<li><p><code>/dev/null</code> → discard output</p>
</li>
</ul>
<h3>Why it exists</h3>
<p>Provides a unified interface for hardware interaction.</p>
<h3>What problem it solves</h3>
<p>Makes devices accessible using the same read/write operations as files.</p>
<h3>Deep insight</h3>
<p>This was mind-blowing.</p>
<blockquote>
<p>Even a hard disk is represented like a file.</p>
</blockquote>
<p>This abstraction makes Linux incredibly powerful.</p>
<hr />
<h2>9. <code>/boot</code> — Where Linux Begins Life</h2>
<p>This directory contains everything needed for startup.</p>
<p>Files include:</p>
<ul>
<li><p>kernel image</p>
</li>
<li><p>initramfs</p>
</li>
<li><p>bootloader configs</p>
</li>
</ul>
<h3>Why it exists</h3>
<p>The system must know how to start before userspace loads.</p>
<h3>What problem it solves</h3>
<p>Defines the initial execution chain.</p>
<h3>Deep insight</h3>
<p>Booting is simply a sequence of controlled file loading.</p>
<p>There is no magic.</p>
<p>Only structured execution.</p>
<hr />
<h2>10. <code>systemd</code> — The Service Orchestrator</h2>
<p>Modern Linux systems heavily depend on <code>systemd</code>.</p>
<p>Service definitions live in:</p>
<pre><code class="language-plaintext">/etc/systemd/
</code></pre>
<h3>Why it exists</h3>
<p>Manages background services.</p>
<h3>What problem it solves</h3>
<p>Ensures processes start correctly and restart if they fail.</p>
<h3>Deep insight</h3>
<p>This is where Linux behaves like an orchestrated ecosystem.</p>
<p>For example:</p>
<ul>
<li><p>database starts before backend</p>
</li>
<li><p>network initializes before services</p>
</li>
</ul>
<p>This dependency handling is extremely powerful.</p>
<hr />
<h2>My Biggest Realization</h2>
<p>Before this exploration, Linux felt like a command-based OS.</p>
<p>Now it feels like:</p>
<blockquote>
<p>A transparent system built on readable logic.</p>
</blockquote>
<p>Every important component is exposed:</p>
<ul>
<li><p>configs</p>
</li>
<li><p>devices</p>
</li>
<li><p>processes</p>
</li>
<li><p>routing</p>
</li>
<li><p>logs</p>
</li>
<li><p>permissions</p>
</li>
</ul>
<p>This openness is what makes Linux so powerful for engineers.</p>
<hr />
<p><em>Linux is not hiding anything.<br />It invites you to explore.</em> 🔍</p>
]]></content:encoded></item></channel></rss>