<?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[Day 02 - Linux ArchT, Processes ,systemd]]></title><description><![CDATA[Day 02 - Linux ArchT, Processes ,systemd]]></description><link>https://day-02-linux-archt-processes-systemd.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Thu, 25 Jun 2026 07:39:15 GMT</lastBuildDate><atom:link href="https://day-02-linux-archt-processes-systemd.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Day 02 – Understanding Linux Architecture, Processes, and systemd]]></title><description><![CDATA[🚀 Introduction
Today I learned what happens inside Linux instead of just running commands blindly.
Linux may seem complicated at first, but when we understand how its parts connect, everything starts making sense.
Linux works in layers, and each lay...]]></description><link>https://day-02-linux-archt-processes-systemd.hashnode.dev/day-02-understanding-linux-architecture-processes-and-systemd</link><guid isPermaLink="true">https://day-02-linux-archt-processes-systemd.hashnode.dev/day-02-understanding-linux-architecture-processes-and-systemd</guid><category><![CDATA[devops linux systemd beginners learninginpublic]]></category><dc:creator><![CDATA[Divyat Agrawal]]></dc:creator><pubDate>Sat, 24 Jan 2026 18:30:00 GMT</pubDate><content:encoded><![CDATA[<h2 id="heading-introduction">🚀 Introduction</h2>
<p>Today I learned what happens <strong>inside Linux</strong> instead of just running commands blindly.</p>
<p>Linux may seem complicated at first, but when we understand how its parts connect, everything starts making sense.</p>
<p>Linux works in layers, and each layer has a role.</p>
<hr />
<h2 id="heading-linux-architecture-how-everything-connects">🧩 Linux Architecture (How Everything Connects)</h2>
<p>Think of Linux like a company structure.</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Layer</td><td>Role</td><td>Example</td></tr>
</thead>
<tbody>
<tr>
<td><strong>Hardware</strong></td><td>Physical components</td><td>CPU, RAM, Disk</td></tr>
<tr>
<td><strong>Kernel</strong></td><td>Brain of the system</td><td>Manages memory &amp; CPU</td></tr>
<tr>
<td><strong>Shell</strong></td><td>Interface between user and kernel</td><td>Terminal (bash)</td></tr>
<tr>
<td><strong>Applications</strong></td><td>Programs that do work</td><td>Nginx, MySQL</td></tr>
</tbody>
</table>
</div><hr />
<h3 id="heading-how-they-work-together">🔗 How They Work Together</h3>
<p>When you type a command like:</p>
<pre><code class="lang-plaintext">ls
</code></pre>
<p>This happens behind the scenes:</p>
<p><strong>User → Shell → Kernel → Hardware → Result back to user</strong></p>
<p>The shell sends the request, but the <strong>kernel</strong> actually talks to the hardware.</p>
<hr />
<h2 id="heading-what-is-a-process">⚙️ What is a Process?</h2>
<p>A <strong>process</strong> is simply a running program.</p>
<p>Example:<br />When you start a web server:</p>
<pre><code class="lang-plaintext">systemctl start nginx
</code></pre>
<p>Linux creates a process for Nginx.</p>
<p>You can see running processes using:</p>
<pre><code class="lang-plaintext">ps aux
top
</code></pre>
<p>Each process has:</p>
<ul>
<li><p>PID (Process ID)</p>
</li>
<li><p>CPU usage</p>
</li>
<li><p>Memory usage</p>
</li>
<li><p>State</p>
</li>
</ul>
<hr />
<h2 id="heading-process-states-easy-meaning">🔄 Process States (Easy Meaning)</h2>
<div class="hn-table">
<table>
<thead>
<tr>
<td>State</td><td>Meaning</td><td>Example</td></tr>
</thead>
<tbody>
<tr>
<td>Running</td><td>Using CPU</td><td>A script executing</td></tr>
<tr>
<td>Sleeping</td><td>Waiting</td><td>Nginx waiting for request</td></tr>
<tr>
<td>Stopped</td><td>Paused</td><td>Process stopped manually</td></tr>
<tr>
<td>Zombie</td><td>Finished but not cleaned</td><td>Rare system leftover</td></tr>
</tbody>
</table>
</div><p>Most processes are usually <strong>sleeping</strong>, not actively running.</p>
<hr />
<h2 id="heading-what-is-systemd">👨‍💼 What is systemd?</h2>
<p>When Linux boots, one of the first important programs that starts is <strong>systemd</strong>.</p>
<p>systemd is the <strong>service manager</strong> of Linux.</p>
<p>It is responsible for:</p>
<ul>
<li><p>Starting services at boot</p>
</li>
<li><p>Stopping services</p>
</li>
<li><p>Restarting services if they crash</p>
</li>
<li><p>Managing service logs</p>
</li>
</ul>
<hr />
<h2 id="heading-important-systemd-commands">🔧 Important systemd Commands</h2>
<pre><code class="lang-plaintext">systemctl start nginx      # Start a service
systemctl stop nginx       # Stop a service
systemctl restart nginx    # Restart a service
systemctl status nginx     # Check service status
systemctl enable nginx     # Start service on boot
systemctl disable nginx    # Disable service at boot
journalctl -u nginx        # View logs of a service
</code></pre>
<hr />
<h3 id="heading-real-devops-example">🧠 Real DevOps Example</h3>
<p>If a website goes down:</p>
<p><strong>1️⃣ Check service status</strong></p>
<pre><code class="lang-plaintext">systemctl status nginx
</code></pre>
<p><strong>2️⃣ Restart service</strong></p>
<pre><code class="lang-plaintext">systemctl restart nginx
</code></pre>
<p><strong>3️⃣ Check error logs</strong></p>
<pre><code class="lang-plaintext">journalctl -u nginx
</code></pre>
<hr />
<h2 id="heading-big-picture-how-everything-works-together">🧠 Big Picture (How Everything Works Together)</h2>
<p>Let’s say a user opens a website hosted on your server:</p>
<p>1️⃣ Nginx process receives the request<br />2️⃣ Process asks <strong>kernel</strong> for CPU &amp; memory<br />3️⃣ Kernel talks to <strong>hardware</strong><br />4️⃣ systemd ensures Nginx keeps running</p>
<p>If Nginx crashes → systemd can restart it automatically.</p>
<hr />
<h2 id="heading-5-daily-linux-commands">🛠 5 Daily Linux Commands</h2>
<pre><code class="lang-plaintext">ps aux                  # Show all processes
top                     # Live process monitoring
htop                    # Better system monitor
kill &lt;PID&gt;              # Stop a process
systemctl status nginx  # Check service health
</code></pre>
<hr />
<h2 id="heading-why-this-matters-for-devops">🎯 Why This Matters for DevOps</h2>
<p>Understanding Linux internals helps you:</p>
<p>✔ Fix crashed services<br />✔ Troubleshoot CPU/memory issues<br />✔ Understand logs<br />✔ Debug production problems faster</p>
<p>Linux knowledge = Strong DevOps foundation.</p>
<hr />
<p>See you on <strong>Day 03 – Linux File System</strong> 🚀</p>
]]></content:encoded></item></channel></rss>