<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged operating system</title>
<link>https://coderlegion.com/tag/operating+system</link>
<description>Powered by Question2Answer</description>
<item>
<title>Beyond the Terminal: My Hunt Through the Linux File System</title>
<link>https://coderlegion.com/15771/beyond-the-terminal-my-hunt-through-the-linux-file-system</link>
<description>&lt;p&gt;At first, Linux felt like magic. You open the terminal, type a command… and things just work. No questions asked. But after a while, that “magic” started bothering me.&lt;/p&gt;
&lt;p&gt;Because I kept thinking:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;Where is all of this actually happening?&lt;/em&gt;&lt;br&gt;
&lt;em&gt;How does the system know what to do?&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Like… when I connect to the internet, where is that configuration stored?&lt;br&gt;
When a user logs in, where is that data coming from?&lt;br&gt;
When something breaks, where does Linux keep track of it?&lt;/p&gt;
&lt;p&gt;These weren’t just random questions anymore. They were pulling me deeper.&lt;/p&gt;
&lt;p&gt;So instead of just &lt;em&gt;using&lt;/em&gt; Linux… I decided to &lt;strong&gt;explore it&lt;/strong&gt;. Not like a normal user.&lt;br&gt;
But like someone trying to understand what’s going on behind the scenes.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Digging into folders.&lt;br&gt;
Opening system files.&lt;br&gt;
Trying to connect the dots.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;And what I discovered?&lt;/p&gt;
&lt;p&gt;It completely changed how I look at Linux. Because behind every command…&lt;br&gt;
there’s a system quietly doing a lot more than we realize.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;-etc---the-place-where-system-behavior-lives&quot;&gt;&lt;code&gt;/etc&lt;/code&gt; - The Place Where System Behavior Lives&lt;/h3&gt;
&lt;p&gt;The first place I explored was &lt;code&gt;/etc&lt;/code&gt;, because I kept hearing that it’s important.&lt;/p&gt;
&lt;p&gt;So I went inside:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-shell&quot;&gt;cd /etc
ls
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;At first, it just looked like a collection of random files. But the more I opened them, the more I realized something important.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;/etc&lt;/code&gt; is not just a folder.&lt;/p&gt;
&lt;p&gt;It is where Linux stores &lt;strong&gt;all configuration that controls system behavior&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn.hashnode.com/uploads/covers/69382f58e4ddfd795d01b951/dba90699-454f-4cc7-9a3c-108dba3df80f.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;When I opened files like:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-shell&quot;&gt;cat /etc/hosts
cat /etc/passwd
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I could literally see how my system is configured.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn.hashnode.com/uploads/covers/69382f58e4ddfd795d01b951/8952535f-a89e-4628-8338-f62ce3adb2e7.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn.hashnode.com/uploads/covers/69382f58e4ddfd795d01b951/dd7b2d29-2731-42ca-b656-cbf8384c9ad4.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;This made me realize &lt;em&gt;why this folder exists&lt;/em&gt;. Instead of hardcoding system behavior deep inside programs, Linux stores configurations as editable files. This means the system becomes flexible you can change behavior without touching the core system.&lt;/p&gt;
&lt;p&gt;The problem this solves is huge. Imagine if you had to recompile the OS just to change a setting. That would be impossible for daily use.&lt;/p&gt;
&lt;p&gt;But with &lt;code&gt;/etc&lt;/code&gt;, Linux separates &lt;strong&gt;configuration from execution&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;And the insight that hit me was this:&lt;br&gt;
My system is not controlled by hidden magic. It’s controlled by &lt;strong&gt;plain text files that I can read and understand&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;-etc-resolv-conf---how-my-system-finds-websites&quot;&gt;&lt;code&gt;/etc/resolv.conf&lt;/code&gt; - How My System Finds Websites&lt;/h3&gt;
&lt;p&gt;One thing I never really questioned was typing something like:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-shell&quot;&gt;ping google.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It just works. But then I stopped and thought:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;How does my system even understand what “&lt;/em&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;http://google.com&quot;&gt;&lt;em&gt;google.com&lt;/em&gt;&lt;/a&gt;&lt;em&gt;” is?&lt;/em&gt;&lt;br&gt;
Because at the end of the day, computers don’t understand names, they understand IP addresses.&lt;/p&gt;
&lt;p&gt;So I decided to dig into it.&lt;/p&gt;
&lt;p&gt;I ran:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-shell&quot;&gt;cat /etc/resolv.conf
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn.hashnode.com/uploads/covers/69382f58e4ddfd795d01b951/bd69aef9-4629-4832-955e-75e99101d859.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;And I saw this:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-shell&quot;&gt;nameserver 10.0.2.3
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;At first, this confused me.&lt;/p&gt;
&lt;p&gt;I was expecting something like &lt;code&gt;8.8.8.8&lt;/code&gt; (Google DNS).&lt;br&gt;
But this… looked different.&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;so-what-is-this-10-0-2-3&quot;&gt;So what is this &lt;code&gt;10.0.2.3&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;It turns out, this is not a public DNS server. It’s a &lt;strong&gt;local DNS resolver provided by my virtual machine environment&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Since I’m running Linux inside a VM, my system is not directly talking to the internet.&lt;/p&gt;
&lt;p&gt;Instead, it works like this:&lt;/p&gt;
&lt;p&gt;My Linux system → asks &lt;code&gt;10.0.2.3&lt;/code&gt; → which then forwards the request to actual DNS servers&lt;/p&gt;
&lt;p&gt;So basically, &lt;code&gt;10.0.2.3&lt;/code&gt; is acting like a &lt;strong&gt;middleman&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;why-does-this-file-exist-&quot;&gt;Why does this file exist?&lt;/h4&gt;
&lt;p&gt;This file tells the system: “If you don’t understand a domain name, ask this nameserver.”&lt;/p&gt;
&lt;p&gt;Without this, the system wouldn’t know where to send DNS queries.&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;what-problem-does-it-solve-&quot;&gt;What problem does it solve?&lt;/h4&gt;
&lt;p&gt;Humans use names like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;http://google.com&quot;&gt;google.com&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;http://youtube.com&quot;&gt;youtube.com&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But systems use IP addresses. So DNS acts as a &lt;strong&gt;translator&lt;/strong&gt; between human-friendly names and machine-friendly IPs.&lt;/p&gt;
&lt;p&gt;And &lt;code&gt;/etc/resolv.conf&lt;/code&gt; tells Linux &lt;em&gt;where that translator lives&lt;/em&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;what-i-found-interesting&quot;&gt;What I found interesting&lt;/h4&gt;
&lt;p&gt;The biggest realization for me was this: My system isn’t always directly using public DNS.&lt;br&gt;
In my case, it’s using a &lt;strong&gt;local resolver (10.0.2.3)&lt;/strong&gt;, which then handles everything behind the scenes.&lt;/p&gt;
&lt;p&gt;That means even something as simple as opening a website involves:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;local system configuration&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;virtual networking layers&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DNS forwarding&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h4 id=&quot;small-but-powerful-insight&quot;&gt;Small but powerful insight&lt;/h4&gt;
&lt;p&gt;&lt;em&gt;Just by changing this file, I can control how my system resolves domains.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Which means I can switch to a faster DNS, block certain domains, &amp;amp; control network behavior.&lt;/p&gt;
&lt;p&gt;And honestly… Something as simple as opening a website suddenly felt &lt;strong&gt;way deeper than I thought&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;routing-table---how-linux-decides-where-data-goes&quot;&gt;Routing Table - How Linux Decides Where Data Goes&lt;/h3&gt;
&lt;p&gt;Next, I wanted to understand how my system sends data.&lt;/p&gt;
&lt;p&gt;So I ran:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-shell&quot;&gt;ip route
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;What I saw was something like:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn.hashnode.com/uploads/covers/69382f58e4ddfd795d01b951/1fddee76-f327-4faa-bb16-91158aff8197.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;This is the routing table.&lt;/p&gt;
&lt;p&gt;At a basic level, this tells the system: &lt;em&gt;“If you don’t know where to send data, send it to this gateway.”&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;In my case, that gateway is &lt;code&gt;10.0.2.2&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;This exists because your system doesn’t just randomly send data. It needs a structured way to decide where packets go.&lt;/p&gt;
&lt;p&gt;The problem it solves is routing confusion. Without this, your system wouldn’t know whether to send data locally or over the internet.&lt;/p&gt;
&lt;p&gt;The second line (&lt;code&gt;10.0.2.0/24&lt;/code&gt;) tells the system that anything in this local network range can be accessed directly, without going through the gateway.&lt;/p&gt;
&lt;p&gt;The insight here was surprising: My system is not just sending data it’s making &lt;strong&gt;routing decisions like a mini network controller&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;And since I’m using a virtual machine, &lt;code&gt;10.0.2.2&lt;/code&gt; is actually a &lt;strong&gt;virtual gateway&lt;/strong&gt;, not a physical router.&lt;/p&gt;
&lt;p&gt;I always thought networking happens “somewhere outside”. But Linux is actively involved in deciding paths. And in this case, it’s even routing traffic through a virtual layer before it reaches the real network.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;-var-log---the-silent-observer-of-everything&quot;&gt;&lt;code&gt;/var/log&lt;/code&gt; - The Silent Observer of Everything&lt;/h3&gt;
&lt;p&gt;Then I explored logs:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-shell&quot;&gt;cd /var/log
ls
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn.hashnode.com/uploads/covers/69382f58e4ddfd795d01b951/6804e197-0fe4-4b02-8de9-942abd566740.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;And opened files like:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-shell&quot;&gt;cat messages
cat secure
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This folder is basically the &lt;strong&gt;memory of the system&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Everything that happens:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;logins&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;errors&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;services&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;system events&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;…it all gets recorded here. This exists because systems need a way to track what’s happening internally.&lt;br&gt;
The problem it solves is debugging and monitoring. Without logs, if something breaks, you’re blind.&lt;/p&gt;
&lt;p&gt;But what really stood out to me was this:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Linux doesn’t interrupt you with errors all the time.&lt;br&gt;
It quietly writes everything down.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It’s like the system is constantly saying:&lt;br&gt;
“I’ll tell you everything… but only if you come and look.”&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;-etc-passwd-amp-etc-shadow---how-linux-handles-users-securely&quot;&gt;&lt;code&gt;/etc/passwd&lt;/code&gt; &amp;amp; &lt;code&gt;/etc/shadow&lt;/code&gt; - How Linux Handles Users Securely&lt;/h3&gt;
&lt;p&gt;To understand users, I ran:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-shell&quot;&gt;cat /etc/passwd
sudo cat /etc/shadow
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;What I saw was interesting.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn.hashnode.com/uploads/covers/69382f58e4ddfd795d01b951/c9f9d74e-3a88-4f9a-9772-4e9b876f4006.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;/etc/passwd&lt;/code&gt; contains user details.&lt;/p&gt;
&lt;p&gt;But passwords are not there.&lt;/p&gt;
&lt;p&gt;They’re stored in &lt;code&gt;/etc/shadow&lt;/code&gt;, which requires special permissions.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn.hashnode.com/uploads/covers/69382f58e4ddfd795d01b951/f8886199-5b1b-460d-8c26-1fb50204d8de.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;This exists for security reasons. If everything was stored in one place, anyone could read sensitive data.&lt;/p&gt;
&lt;p&gt;The problem it solves is protecting user credentials.&lt;/p&gt;
&lt;p&gt;But the insight here was deeper:&lt;/p&gt;
&lt;p&gt;Linux separates identity from authentication.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;/etc/passwd&lt;/code&gt; → who you are&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;/etc/shadow&lt;/code&gt; → how you prove it&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That separation makes the system more secure by design.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;permissions---built-in-security-not-an-add-on&quot;&gt;Permissions - Built-In Security, Not an Add-On&lt;/h3&gt;
&lt;p&gt;When I ran:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-shell&quot;&gt;ls -l
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I saw things like:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-shell&quot;&gt;-rwxr-xr--
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn.hashnode.com/uploads/covers/69382f58e4ddfd795d01b951/fe6fc764-6e65-41a7-9cac-2ba703eaedbd.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;At first, it looked confusing. But then i understood: this is how Linux controls access to every file.&lt;/p&gt;
&lt;p&gt;Permissions exist because not every user should have full control over everything.&lt;/p&gt;
&lt;p&gt;The problem it solves is unauthorized access and system damage.&lt;/p&gt;
&lt;p&gt;But what really stood out was:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Security in Linux is not something extra.&lt;br&gt;
It is built directly into the file system itself.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Every file carries its own rules.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;-proc---where-i-saw-the-system-live&quot;&gt;&lt;code&gt;/proc&lt;/code&gt; - Where I Saw the System Live&lt;/h3&gt;
&lt;p&gt;This was the most surprising part&lt;/p&gt;
&lt;p&gt;I explored:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-shell&quot;&gt;cd /proc
ls
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn.hashnode.com/uploads/covers/69382f58e4ddfd795d01b951/9149fc76-6d64-4f95-a1b6-6e8adbb6bc22.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;And then:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-shell&quot;&gt;cat /proc/cpuinfo
cat /proc/meminfo
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn.hashnode.com/uploads/covers/69382f58e4ddfd795d01b951/d758033f-d9de-42a3-8fc1-8148de180518.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn.hashnode.com/uploads/covers/69382f58e4ddfd795d01b951/6f75e522-7ea9-4302-9705-27d31df5d31f.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;What I realized is: These are not real files stored on disk. They are generated in &lt;strong&gt;real time by the kernel&lt;/strong&gt;. This exists so users and programs can access live system data.&lt;br&gt;
The problem it solves is system monitoring.&lt;/p&gt;
&lt;p&gt;But the insight here blew my mind:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;When I read these files, I’m not reading stored data.&lt;br&gt;
I’m interacting with the system &lt;em&gt;live&lt;/em&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It felt like I was directly talking to Linux.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;-dev---where-hardware-becomes-files&quot;&gt;&lt;code&gt;/dev&lt;/code&gt; - Where Hardware Becomes Files&lt;/h3&gt;
&lt;p&gt;Then I explored:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-shell&quot;&gt;ls /dev
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I saw entries for disks, terminals, and devices.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn.hashnode.com/uploads/covers/69382f58e4ddfd795d01b951/d61e42c5-dae6-40ac-8bc4-c8aea3435d04.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;This exists because Linux treats hardware as files.&lt;/p&gt;
&lt;p&gt;The problem it solves is complexity. Instead of learning different ways to interact with devices, everything becomes file operations.&lt;/p&gt;
&lt;p&gt;And the insight here was simple but powerful: In Linux, everything is unified under one idea: files.&lt;/p&gt;
&lt;p&gt;That consistency makes the system elegant.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;-boot---the-starting-point-of-everything&quot;&gt;&lt;code&gt;/boot&lt;/code&gt; - The Starting Point of Everything&lt;/h3&gt;
&lt;p&gt;Finally, I checked:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-shell&quot;&gt;ls /boot
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This folder contains the kernel and bootloader files.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn.hashnode.com/uploads/covers/69382f58e4ddfd795d01b951/e1042324-f3ca-4bff-a7b6-a4b3df12c46d.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;This exists because the system needs instructions to start itself. The problem it solves is system initialization.&lt;br&gt;
And the insight: Without &lt;code&gt;/boot&lt;/code&gt;, Linux cannot even begin to run.&lt;/p&gt;
&lt;p&gt;It’s literally where everything starts.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;-var-log-secure---who-tried-to-enter-my-system-&quot;&gt;&lt;code&gt;/var/log/secure&lt;/code&gt; - Who Tried to Enter My System?&lt;/h3&gt;
&lt;p&gt;While exploring logs, I went deeper:&lt;/p&gt;
&lt;p&gt;So I ran:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-shell&quot;&gt;sudo tail -f /var/log/secure
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn.hashnode.com/uploads/covers/69382f58e4ddfd795d01b951/f74b3e91-c729-457b-8959-8937be20b451.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;And what I saw was honestly eye-opening.&lt;/p&gt;
&lt;p&gt;This file logs things like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;login attempts&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;sudo usage&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;authentication failures&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Basically… anything related to &lt;strong&gt;who is trying to access the system&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;This exists because systems need to keep track of access.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Who logged in&lt;br&gt;
Who tried and failed&lt;br&gt;
Who used admin privileges&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Without something like this, there would be no way to monitor system security.&lt;/p&gt;
&lt;p&gt;The problem it solves is pretty serious. If something suspicious happens, like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;repeated failed login attempts&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;unauthorized access&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;misuse of sudo&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;you need a way to trace it. And that’s exactly what this file does. The insight here really changed how I see system logs.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Linux doesn’t constantly warn you about everything.&lt;br&gt;
Instead, it quietly records everything in the background.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;And this file becomes like a &lt;strong&gt;security audit trail&lt;/strong&gt;. If someone tries to break into your system… the evidence is already there.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;-dev-null---the-black-hole-of-linux&quot;&gt;&lt;code&gt;/dev/null&lt;/code&gt; - The Black Hole of Linux&lt;/h3&gt;
&lt;p&gt;This one was honestly one of the coolest discoveries.&lt;/p&gt;
&lt;p&gt;I started with something simple:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-shell&quot;&gt;ls /dev/null
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then I tried this:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-shell&quot;&gt;echo &quot;hello&quot; &amp;gt; /dev/null
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And… it disappeared.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn.hashnode.com/uploads/covers/69382f58e4ddfd795d01b951/a07e4e13-1593-4e1c-a368-3ae8b5c8c2e7.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;No output. Nothing showed up anywhere. That’s when I realized what was happening.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;/dev/null&lt;/code&gt; is a special file that &lt;strong&gt;discards anything written to it&lt;/strong&gt;. This exists because sometimes, you don’t care about output. Maybe a command is producing too much noise, or you just want to run something silently.&lt;/p&gt;
&lt;p&gt;The problem it solves is simple but important. Without &lt;code&gt;/dev/null&lt;/code&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;your terminal would get cluttered&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;scripts would print unnecessary output&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;things would become harder to manage&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The insight here was actually pretty cool.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;/dev/null&lt;/code&gt; is like a black hole. Anything goes in… and nothing comes out. And suddenly, this made sense:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-shell&quot;&gt;command &amp;gt; /dev/null 2&amp;gt;&amp;amp;1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This basically tells the system:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Run the command, but don’t show me anything.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;And now I finally understood why developers use it so often.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;systemd---the-hidden-manager-running-everything&quot;&gt;&lt;code&gt;systemd&lt;/code&gt; - The Hidden Manager Running Everything&lt;/h3&gt;
&lt;p&gt;Then I got curious about what’s running behind the scenes.&lt;/p&gt;
&lt;p&gt;So I explored:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-shell&quot;&gt;cd /etc/systemd/system
ls
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn.hashnode.com/uploads/covers/69382f58e4ddfd795d01b951/e45e98ea-2cc7-495c-9822-8913298b7bb6.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;At first, it just looked like a bunch of configuration files.&lt;/p&gt;
&lt;p&gt;But then it clicked. This is where &lt;strong&gt;system services are defined and managed&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;systemd&lt;/code&gt; is basically the component that handles:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;services&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;startup processes&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;background tasks&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It’s the reason your system feels “alive” even when you’re not doing anything.&lt;/p&gt;
&lt;p&gt;This exists because modern systems need automation. You don’t manually start things like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;networking&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;logging&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;system monitoring&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Every time you boot your system.&lt;/p&gt;
&lt;p&gt;The problem it solves is huge. Without something like &lt;code&gt;systemd&lt;/code&gt; you would have to manually start every service after boot . Which is clearly not practical. The insight here was interesting. Even when I’m doing nothing…&lt;br&gt;
Linux is still running multiple services silently in the background. Things just work because &lt;code&gt;systemd&lt;/code&gt; is managing everything for me.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;-boot-grub2-grub-cfg---the-first-instructions-linux-follows&quot;&gt;&lt;code&gt;/boot/grub2/grub.cfg&lt;/code&gt; - The First Instructions Linux Follows&lt;/h3&gt;
&lt;p&gt;This one felt powerful.&lt;/p&gt;
&lt;p&gt;I ran:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;cat /boot/grub2/grub.cfg
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And I was looking at the configuration used by GRUB the bootloader.&lt;/p&gt;
&lt;p&gt;This file tells the system:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;which kernel to load&lt;br&gt;
how to start Linux&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This exists because before Linux even starts, something needs to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;initialize the system&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;load the kernel&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;hand over control to the OS&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And that’s exactly what the bootloader does.&lt;/p&gt;
&lt;p&gt;The problem it solves is fundamental. Without this configuration:&lt;br&gt;
the system wouldn’t even know how to boot. No startup. No OS. Nothing.&lt;/p&gt;
&lt;p&gt;The insight here made me realize how critical this file is. This is literally where the system’s startup behavior is defined. If this file gets corrupted Linux won’t even start&lt;br&gt;
And that’s when it hit me… This isn’t just another config file. This is the starting point of everything.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;After exploring all these parts, one thing became very clear to me:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Linux is not just an operating system&lt;br&gt;
It is a collection of &lt;strong&gt;well-structured systems connected through files&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;From booting → to users → to networking → to logs&lt;/p&gt;
&lt;p&gt;Everything is transparent, accessible, &amp;amp; understandable.&lt;br&gt;
And once you start exploring it like this… you stop guessing and start understanding.&lt;/p&gt;
&lt;p&gt;Linux is not hiding anything from you.&lt;br&gt;
Everything is there in files, waiting to be explored.&lt;/p&gt;
&lt;p&gt;The moment you stop just using Linux… and start reading it… that’s when things finally start clicking.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/15771/beyond-the-terminal-my-hunt-through-the-linux-file-system</guid>
<pubDate>Sat, 25 Apr 2026 05:07:24 +0000</pubDate>
</item>
</channel>
</rss>