<?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" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Deepanshu Gahatori on Medium]]></title>
        <description><![CDATA[Stories by Deepanshu Gahatori on Medium]]></description>
        <link>https://medium.com/@gahatorideepwork?source=rss-78bd8117e73b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*_bNzKA5eDKfuEept</url>
            <title>Stories by Deepanshu Gahatori on Medium</title>
            <link>https://medium.com/@gahatorideepwork?source=rss-78bd8117e73b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 14:39:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gahatorideepwork/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Understanding Linux LVM (Step-by-Step with Practical Demo)]]></title>
            <link>https://medium.com/@gahatorideepwork/understanding-linux-lvm-step-by-step-with-practical-demo-55a23204edf4?source=rss-78bd8117e73b------2</link>
            <guid isPermaLink="false">https://medium.com/p/55a23204edf4</guid>
            <category><![CDATA[90daysofdevops]]></category>
            <category><![CDATA[disk-management]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[lvm]]></category>
            <dc:creator><![CDATA[Deepanshu Gahatori]]></dc:creator>
            <pubDate>Mon, 16 Feb 2026 16:46:48 GMT</pubDate>
            <atom:updated>2026-02-16T16:46:48.677Z</atom:updated>
            <content:encoded><![CDATA[<h4>Storage management is one of the most critical skills in Linux and DevOps.</h4><p>On Day 13 of my #90DaysOfDevOps journey, I practiced <strong>Linux Logical Volume Management (LVM)</strong> — a powerful way to manage storage dynamically.</p><p>In this blog, I’ll explain:</p><ul><li>What LVM is</li><li>Why we need it</li><li>What I performed step-by-step</li><li>Commands used</li><li>Common mistakes</li><li>Real-world DevOps relevance</li></ul><h3>🔍 Why LVM?</h3><p>Traditional partitioning is static.</p><p>If a disk partition becomes full:</p><ul><li>You cannot easily extend it.</li><li>You may need downtime.</li><li>Data migration becomes risky.</li></ul><p>LVM solves this problem by adding an abstraction layer.</p><h3>LVM Architecture:</h3><pre>Physical Disk → Physical Volume (PV)<br>                ↓<br>          Volume Group (VG)<br>                ↓<br>          Logical Volume (LV)<br>                ↓<br>            Filesystem<br>                ↓<br>             Mount Point</pre><p>This allows dynamic resizing without repartitioning.</p><h3>🛠 Lab Setup</h3><p>Since I was using WSL without an extra disk, I created a <strong>virtual disk file</strong> and attached it as a loop device.</p><p>📸 <strong>Output Screenshot:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1017/1*ANN1n6HH-YqoBaTcuNM9tw.png" /></figure><h3>✅ Step 1 — Check Current Storage</h3><p>Before making changes, I inspected the current storage layout.</p><h3>Commands Used:</h3><pre>lsblk<br>pvs<br>vgs<br>lvs<br>df -h</pre><h3>What These Commands Do:</h3><ul><li>lsblk → Shows disks and partitions.</li><li>pvs → Shows physical volumes.</li><li>vgs → Shows volume groups.</li><li>lvs → Shows logical volumes.</li><li>df -h → Shows mounted filesystem usage.</li></ul><p>This helps understand the current system state before modifying storage.</p><p>📸 <strong>Output Screenshot:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1gFmWoGnZKpfpiR3s4T8JA.png" /></figure><h3>✅ Step 2 — Create Physical Volume (PV)</h3><p>First, I initialized the disk as an LVM physical volume.</p><h3>Command:</h3><pre>pvcreate /dev/loop0<br>pvs</pre><h3>Explanation:</h3><ul><li>pvcreate prepares the disk for LVM usage.</li><li>pvs verifies that the physical volume was created successfully.</li></ul><p>Now the disk is under LVM control.</p><p>📸 <strong>Output Screenshot:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LEP-k1CViid41MT30a_6Vw.png" /></figure><h3>✅ Step 3 — Create Volume Group (VG)</h3><p>Next, I created a Volume Group, which acts as a storage pool.</p><h3>Command:</h3><pre>vgcreate devops-vg /dev/loop0<br>vgs</pre><h3>Explanation:</h3><ul><li>vgcreate creates a storage pool named devops-vg.</li><li>vgs confirms its size and status.</li></ul><p>Now I can create logical volumes from this pool.</p><p>📸 <strong>Output Screenshot:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LEP-k1CViid41MT30a_6Vw.png" /></figure><h3>✅ Step 4 — Create Logical Volume (LV)</h3><p>I created a 500MB logical volume inside the volume group.</p><h3>Command:</h3><pre>lvcreate -L 500M -n app-data devops-vg<br>lvs</pre><h3>Explanation:</h3><ul><li>-L 500M → Sets size to 500MB.</li><li>-n app-data → Names the logical volume.</li><li>devops-vg → Specifies the volume group.</li></ul><p>Device created:</p><pre>/dev/devops-vg/app-data</pre><p>📸 <strong>Output Screenshot:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nFLDFGHi-SU3bMiv-qyiZA.png" /></figure><h3>✅ Step 5 — Format and Mount the Logical Volume</h3><p>A logical volume cannot store files until it has a filesystem.</p><h3>Commands:</h3><pre>mkfs.ext4 /dev/devops-vg/app-data<br>mkdir -p /mnt/app-data<br>mount /dev/devops-vg/app-data /mnt/app-data<br>df -h /mnt/app-data</pre><h3>Explanation:</h3><ul><li>mkfs.ext4 → Creates an ext4 filesystem.</li><li>mkdir → Creates mount directory.</li><li>mount → Attaches the logical volume to the directory.</li><li>df -h → Verifies available space.</li></ul><p>Now the logical volume is ready for use.</p><p>📸 <strong>Output Screenshot:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nFLDFGHi-SU3bMiv-qyiZA.png" /></figure><h3>✅ Step 6 — Extend the Logical Volume</h3><p>To simulate real production scaling, I extended the volume by 200MB.</p><h3>Commands:</h3><pre>lvextend -L +200M /dev/devops-vg/app-data<br>resize2fs /dev/devops-vg/app-data<br>df -h /mnt/app-data</pre><h3>Explanation:</h3><ul><li>lvextend → Increases logical volume size.</li><li>resize2fs → Expands the filesystem to use new space.</li><li>df -h → Confirms the new size.</li></ul><p>⚠ Important:<br> If you skip resize2fs, the filesystem will still use the old size.</p><p>📸 <strong>Output Screenshot:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gZC9-86Xd81Qx4S8RrPtaw.png" /></figure><h3>🔥 Real-World DevOps Relevance</h3><p>This is exactly how storage expansion works in:</p><ul><li>AWS EC2 with EBS volumes</li><li>Production Linux servers</li><li>Database storage scaling</li></ul><p>When disk usage reaches 100% in production, understanding LVM allows safe resizing without downtime.</p><h3>🧠 Key Takeaways</h3><ol><li>LVM provides flexibility over traditional partitioning.</li><li>Storage can be resized dynamically.</li><li>Extending LV alone is not enough — filesystem must also be resized.</li><li>Always check current storage before making changes.</li><li>Proper cleanup order is important (LV → VG → PV).</li></ol><h3>📌 Final Thoughts</h3><p>Day 13 helped me understand how storage scaling works internally in Linux systems.</p><p>This was not just about running commands — it was about understanding storage abstraction and safe resizing in real-world DevOps environments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=55a23204edf4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering Linux User & Group Management — A Practical Hands-On Guide (With Command Outputs)]]></title>
            <link>https://medium.com/@gahatorideepwork/mastering-linux-user-group-management-a-practical-hands-on-guide-with-command-outputs-c67445829f25?source=rss-78bd8117e73b------2</link>
            <guid isPermaLink="false">https://medium.com/p/c67445829f25</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[file-operations]]></category>
            <category><![CDATA[linux-file-permission]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[90daysofdevops]]></category>
            <dc:creator><![CDATA[Deepanshu Gahatori]]></dc:creator>
            <pubDate>Wed, 11 Feb 2026 17:44:19 GMT</pubDate>
            <atom:updated>2026-02-11T17:44:19.954Z</atom:updated>
            <content:encoded><![CDATA[<h4>On Day 09 of my 90DaysOfDevOps journey, I focused on Linux User and Group Management — a core skill for DevOps and System Administration.</h4><p>Proper user and permission control is critical in production environments for security, collaboration, and controlled access.</p><p>In this hands-on lab, I implemented real-world scenarios and verified everything using command outputs.</p><p>In this blog, I’ll share:</p><ul><li>What I implemented</li><li>Commands used</li><li>Output verification</li><li>Key learnings</li><li>Common mistakes to avoid</li><li>Production best practices</li></ul><p>This is practical, hands-on Linux administration.</p><h3>1️⃣ Creating Users with Home Directories</h3><h3>Commands Used</h3><pre>sudo useradd -m tokyo</pre><pre>sudo useradd -m berlin</pre><pre>sudo useradd -m professor</pre><pre>sudo passwd tokyo</pre><pre>sudo passwd berlin</pre><pre>sudo passwd professor</pre><h3>Verification Commands</h3><pre>grep -E &#39;tokyo|berlin|professor&#39; /etc/passwd</pre><pre>ls -l /home</pre><h3>Expected Output Example</h3><pre>tokyo:x:1001:1001::/home/tokyo:/bin/bash</pre><pre>berlin:x:1002:1002::/home/berlin:/bin/bash</pre><pre>professor:x:1003:1003::/home/professor:/bin/bash</pre><pre>drwxr-xr-x 2 tokyo     tokyo     4096 /home/tokyo</pre><pre>drwxr-xr-x 2 berlin    berlin    4096 /home/berlin</pre><pre>drwxr-xr-x 2 professor professor 4096 /home/professor</pre><h3>📸 Command Output Screenshot</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/665/1*iLnzL1N5kLw_o6gkLqPWMg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1001/1*Na5VKmRdl8V-s40yNQKqRw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/893/1*f41CKPy81DmKB5hxGMAttw.png" /></figure><h3>2️⃣ Creating Groups</h3><h3>Commands Used</h3><pre>sudo groupadd developers</pre><pre>sudo groupadd admins</pre><h3>Verification</h3><pre>grep -E &#39;developers|admins&#39; /etc/group</pre><h3>Expected Output</h3><pre>developers:x:1004:</pre><pre>admins:x:1005:</pre><h3>📸 Command Output Screenshot</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/693/1*YXE3SRUBHijbhFy_OrMK2w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/634/1*GlSHJxexdpx2yVoGzeBFUg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*c1G1gTBSowaNJLAgDj0a6A.png" /></figure><h3>3️⃣ Assigning Users to Groups</h3><h3>Commands Used</h3><pre>sudo usermod -aG developers tokyo</pre><pre>sudo usermod -aG developers,admins berlin</pre><pre>sudo usermod -aG admins professor</pre><h3>Verification</h3><pre>groups tokyo</pre><pre>groups berlin</pre><pre>groups professor</pre><h3>Expected Output</h3><pre>tokyo : tokyo developers</pre><pre>berlin : berlin developers admins</pre><pre>professor : professor admins</pre><h3>📸 Command Output Screenshot</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*eS49J5XBSqYQ2BlkY1Hk6A.png" /></figure><h3>4️⃣ Removing a User from a Group</h3><h3>Command Used</h3><pre>sudo gpasswd -d berlin admins</pre><h3>Verification</h3><pre>groups berlin</pre><h3>Expected Output</h3><pre>Removing user berlin from group admins</pre><pre>berlin : berlin developers</pre><h3>📸 Command Output Screenshot</h3><h3>5️⃣ Deleting a Group</h3><h3>Command Used</h3><pre>sudo groupdel admins</pre><h3>Verification</h3><pre>grep admins /etc/group</pre><h3>Expected Output</h3><p>(No output)</p><h3>📸 Command Output Screenshot</h3><h3>6️⃣ Creating Shared Directory with Group Permissions</h3><h3>Commands Used</h3><pre>sudo mkdir /opt/dev-project</pre><pre>sudo chgrp developers /opt/dev-project</pre><pre>sudo chmod 775 /opt/dev-project</pre><h3>Permission Breakdown</h3><pre>775 = rwxrwxr-x</pre><pre>Owner → Full access</pre><pre>Group → Full access</pre><pre>Others → Read &amp; execute only</pre><h3>Verification</h3><pre>ls -ld /opt/dev-project</pre><h3>Expected Output</h3><pre>drwxrwxr-x 2 root developers 4096 /opt/dev-project</pre><h3>Test Access</h3><pre>sudo -u tokyo touch /opt/dev-project/tokyo.txt</pre><pre>sudo -u berlin touch /opt/dev-project/berlin.txt</pre><pre>ls -l /opt/dev-project</pre><h3>📸 Command Output Screenshot</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S6Dt_QzktfXVjInoQ0jLbw.png" /></figure><h3>7️⃣ Team Workspace Setup — Group-Based Collaboration</h3><p>As part of this task, I created a shared workspace for a specific team using proper group-based access control.</p><h3>What I Did</h3><ul><li>Created a new user:</li></ul><pre>sudo useradd -m nairobi</pre><pre>sudo passwd nairobi</pre><ul><li>Created a new group:</li></ul><pre>sudo groupadd project-team</pre><p>(Note: I initially typed grpadd by mistake — Linux commands are strict and typos fail immediately.)</p><ul><li>Added users to the group:</li></ul><pre>sudo usermod -aG project-team nairobi</pre><pre>sudo usermod -aG project-team tokyo</pre><ul><li>Created a shared directory:</li></ul><pre>sudo mkdir /opt/team-workspace</pre><pre>sudo chgrp project-team /opt/team-workspace</pre><pre>sudo chmod 775 /opt/team-workspace</pre><ul><li>Verified permissions:</li></ul><pre>ls -ld /opt/team-workspace</pre><p>Output confirmed:</p><pre>drwxrwxr-x 2 root project-team ...</pre><ul><li>Tested access as nairobi:</li></ul><pre>sudo -u nairobi touch /opt/team-workspace/niarobi.txt</pre><p>Verified file creation:</p><pre>niarobi.txt</pre><h3>📸 Command Output Screenshot</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1016/1*zhHqwStTUEm5ktF5sJUiZw.png" /></figure><h3>What I Learned</h3><ol><li>Groups are the foundation of Linux access control.</li><li>Always use -aG with usermod.</li><li>gpasswd -d safely removes users from groups.</li><li>Never use 777 in production.</li><li>Use setgid (2775) for shared DevOps directories.</li><li>Always verify with groups and ls -ld.</li></ol><h3>What to Avoid</h3><p>❌ Using chmod 777<br> ❌ Forgetting -a flag in usermod<br> ❌ Not verifying group membership<br> ❌ Testing as root instead of actual user<br> ❌ Ignoring primary group limitations</p><h3>How This Applies to DevOps &amp; Cloud</h3><p>In production environments:</p><ul><li>Applications run under service users.</li><li>SSH access is group-controlled.</li><li>CI/CD agents use restricted Linux accounts.</li><li>Containers depend on UID/GID mapping.</li><li>Kubernetes nodes rely on Linux permission model internally.</li></ul><p>If you understand Linux user &amp; group management, you understand server-level security.</p><h3>Final Thoughts</h3><p>User and group management may look basic.</p><p>But in real-world DevOps:</p><ul><li>It protects infrastructure.</li><li>It prevents unauthorized access.</li><li>It controls deployment pipelines.</li><li>It enforces operational boundaries.</li></ul><p>Mastering this early builds strong Linux fundamentals.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c67445829f25" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying a Web Server on Cloud Using Nginx (Hands-on DevOps)]]></title>
            <link>https://medium.com/@gahatorideepwork/deploying-a-web-server-on-cloud-using-nginx-hands-on-devops-43c4eafebeaa?source=rss-78bd8117e73b------2</link>
            <guid isPermaLink="false">https://medium.com/p/43c4eafebeaa</guid>
            <category><![CDATA[web-server]]></category>
            <category><![CDATA[web-deployment]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cloud]]></category>
            <dc:creator><![CDATA[Deepanshu Gahatori]]></dc:creator>
            <pubDate>Tue, 10 Feb 2026 07:36:29 GMT</pubDate>
            <atom:updated>2026-02-10T07:36:29.742Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong>A practical walkthrough of cloud server provisioning, web deployment, and log handling</strong></h4><h4>Introduction</h4><p>On <strong>Day 08</strong> of my 90DaysOfDevOps learning journey, I worked on deploying a <strong>real web server on the cloud</strong>.<br> The objective was simple but very practical: launch a cloud server, install a web server, make it accessible from the internet, and extract server logs.</p><p>This task helped me understand how real servers are set up and managed in production environments.</p><h4>What This Blog Covers</h4><p>In this blog, I will walk through:</p><ul><li>Launching a cloud server (AWS EC2)</li><li>Connecting to the server using SSH</li><li>Installing and running Nginx</li><li>Configuring security groups for web access</li><li>Accessing the web server from a browser</li><li>Viewing and extracting Nginx logs</li><li>Downloading logs to the local machine</li></ul><h4>Prerequisites</h4><p>Before starting, I made sure I had:</p><ul><li>An AWS EC2 instance (Ubuntu 22.04 LTS)</li><li>An SSH key pair (.pem file)</li><li>A local Linux terminal</li><li>Basic Linux command knowledge</li></ul><h4>Step 1: Launching the Cloud Instance</h4><p>I launched an <strong>AWS EC2 instance</strong> with the following configuration:</p><ul><li>OS: Ubuntu 22.04 LTS</li><li>Instance type: t2.micro</li><li>Authentication: SSH key pair</li></ul><p>For network access, I configured the <strong>security group</strong> as follows:</p><ul><li>SSH (Port 22): Allowed only from my IP</li><li>HTTP (Port 80): Allowed from anywhere (0.0.0.0/0)</li></ul><p>This allows secure server access while making the web server publicly reachable.</p><p><strong>📸 <em>Screenshots:</em></strong></p><ul><li>EC2 instance running</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CQoIcWlYcE5KuzBw7OlKCQ.png" /></figure><ul><li>Security group inbound rules</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9PW4AioBdeZl5qxXCf9PRA.png" /></figure><h4>Step 2: Connecting to the Server Using SSH</h4><p>From my local machine, I connected to the EC2 instance using SSH:</p><pre>chmod 400 demo-iam-ec2-key.pem<br>ssh -i demo-iam-ec2-key.pem ubuntu@&lt;PUBLIC_IP&gt;</pre><p>Once connected, I had terminal access to the remote server.</p><p><strong>📸 <em>Screenshots:</em></strong></p><ul><li>Successful SSH login in terminal</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QdQ5zW-rNubEtrU-SP4PUw.png" /></figure><h4>Step 3: Updating the System</h4><p>Before installing any services, I updated the system packages:</p><pre>sudo apt update &amp;&amp; sudo apt upgrade -</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*rN9oK_Yfo0r7k8KGKVVJ1g.png" /></figure><p>This is a good practice to avoid issues caused by outdated packages.</p><h4>Step 4: Installing and Verifying Nginx</h4><p>Next, I installed the <strong>Nginx web server</strong>:</p><pre>sudo apt install nginx -y</pre><p>After installation, I verified that Nginx was running:</p><pre>sudo systemctl status nginx</pre><p>The service status showed <strong>active (running)</strong>, which confirmed that Nginx was successfully installed and started.</p><p><strong>📸 <em>Screenshots:</em></strong></p><ul><li>Nginx service status</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*66B9wyp_my3pVBV5pF0VzA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wyt77zzNsa51kkNgyAH0jQ.png" /></figure><h4>Step 5: Accessing the Web Server from the Browser</h4><p>To confirm that the web server was accessible from the internet, I opened a browser and entered the EC2 public IP:</p><pre>http://&lt;PUBLIC_IP&gt;</pre><p>The <strong>Nginx Welcome Page</strong> appeared, which confirmed:</p><ul><li>Nginx is running</li><li>Port 80 is open</li><li>Security group rules are correctly configured</li></ul><p>📸 <em>Screenshot:</em></p><ul><li>Nginx welcome page in browser</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dlPFsG_G_qecrR4G6Cbyog.png" /></figure><h4>Step 6: Viewing and Extracting Nginx Logs</h4><p>Nginx stores its logs in /var/log/nginx.</p><p>First, I listed the available log files:</p><pre>sudo ls /var/log/nginx</pre><p>The important files are:</p><ul><li>access.log – records incoming requests</li><li>error.log – records errors</li></ul><p>I viewed the access logs using:</p><pre>sudo cat /var/log/nginx/access.log</pre><p>To make it easier to download, I saved the logs into a file:</p><pre>sudo cat /var/log/nginx/access.log &gt; ~/nginx-logs.txt</pre><p>📸 <em>Screenshots:</em></p><ul><li>Access log output</li><li>nginx-logs.txt content</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cZFQVCZ_en434lPP6jjBLg.png" /></figure><h4>Step 7: Downloading Logs to the Local Machine</h4><p>After creating the log file, I exited the server:</p><pre>exit</pre><p>From my <strong>local machine</strong>, I downloaded the log file using SCP:</p><pre>scp -i demo-iam-ec2-key.pem ubuntu@&lt;PUBLIC_IP&gt;:~/nginx-logs.txt .</pre><p>Finally, I verified the file locally:</p><pre>cat nginx-logs.txt</pre><p>📸 <em>Screenshot:</em></p><ul><li>Log file present on local machine</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OtfUbrJQM3Ub1N3SWlSD0A.png" /></figure><h4>Challenges Faced</h4><p>During this task, I faced a few common beginner issues:</p><ul><li>Tried running scp from the EC2 server instead of the local machine</li><li>Used an incorrect log file name initially</li><li>Encountered SSH host authenticity prompt</li></ul><h4>How I Solved Them</h4><ul><li>Understood that scp must be executed from the machine that wants the file</li><li>Carefully verified file names before copying</li><li>Accepted the SSH fingerprint as expected behavior for first-time connections</li></ul><h4>Key Learnings (Quick Revision)</h4><ul><li>How to deploy a web server on a cloud VM</li><li>How security groups control inbound traffic</li><li>Where Nginx access logs are stored</li><li>Correct usage of SSH and SCP</li><li>Difference between local machine and cloud server context</li></ul><h4>Final Thoughts</h4><p>By the end of Day 08, I successfully:</p><ul><li>Deployed Nginx on a cloud server</li><li>Made the web server publicly accessible</li><li>Extracted and downloaded server logs</li><li>Gained hands-on experience with real DevOps workflows</li></ul><p>This task strengthened my understanding of <strong>cloud server management</strong>, which is a core DevOps skill.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43c4eafebeaa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Linux File System Hierarchy & Scenario-Based Troubleshooting]]></title>
            <link>https://medium.com/@gahatorideepwork/linux-file-system-hierarchy-scenario-based-troubleshooting-da5c114fbaa2?source=rss-78bd8117e73b------2</link>
            <guid isPermaLink="false">https://medium.com/p/da5c114fbaa2</guid>
            <category><![CDATA[linux-file-system]]></category>
            <category><![CDATA[90daysofdevops]]></category>
            <category><![CDATA[troubleshooting]]></category>
            <category><![CDATA[file-hierarchy]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Deepanshu Gahatori]]></dc:creator>
            <pubDate>Mon, 09 Feb 2026 16:02:24 GMT</pubDate>
            <atom:updated>2026-02-09T16:02:24.948Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>Building Linux fundamentals by understanding the filesystem hierarchy and practicing real-world troubleshooting scenarios as part of my 90 Days of DevOps journey.</em></h4><p>Linux is the foundation of almost every modern production environment. As a DevOps engineer, your ability to troubleshoot issues quickly depends less on memorizing commands and more on understanding how the system is structured and how services behave at runtime. On <strong>Day 07 of my 90 Days of DevOps journey</strong>, I focused on two essential skills: learning where critical files live in the Linux filesystem and practicing scenario-based troubleshooting that mirrors real production incidents.</p><p>This day was about <strong>thinking like a production engineer</strong>, not memorizing theory.</p><h3>Why the Linux File System Matters in DevOps</h3><p>Most production incidents are not caused by complex bugs.<br> They’re caused by things like:</p><ul><li>Disk full due to logs</li><li>A service not starting after reboot</li><li>Permission issues</li><li>Misconfigured configuration files</li></ul><p>All of these problems become easier to diagnose <strong>only when you understand the Linux file system hierarchy</strong>.</p><h3>Part 1: Linux File System Hierarchy (What Actually Matters)</h3><p>Linux uses a <strong>single-root (</strong><strong>/) structure</strong>. Everything exists under it.</p><p>Here are the directories every DevOps engineer must know — with real-world context.</p><h3>/ (Root)</h3><p>This is the starting point of everything in Linux.<br> All directories and files exist under /.</p><p><strong>Why it matters:</strong><br> When debugging mounts, disk usage, or boot issues, this is where your investigation starts.</p><h3>/home</h3><p>Contains home directories for non-root users.</p><p><strong>Common use cases:</strong></p><ul><li>Application source code</li><li>User SSH keys</li><li>User-specific configs</li></ul><p>If a user says <em>“my files are missing”</em>, this is where you look first.</p><h3>/root</h3><p>Home directory of the root user (not the same as /).</p><p><strong>Used for:</strong></p><ul><li>Admin-only scripts</li><li>Root SSH keys</li></ul><p>Best practice: <strong>never store application data here</strong>.</p><h3>/etc</h3><p>This directory controls system behavior.</p><p><strong>Contains:</strong></p><ul><li>Service configs</li><li>Network configs</li><li>User and authentication settings</li></ul><p>If a service breaks after a config change, /etc is almost always involved.</p><p>⚠️ One wrong edit here can bring production down.</p><h3>/var/log</h3><p>This is the <strong>most important directory for troubleshooting</strong>.</p><p><strong>Contains:</strong></p><ul><li>System logs</li><li>Authentication logs</li><li>Application logs</li></ul><p>When something fails, logs explain <em>why</em>.</p><blockquote><em>If you don’t check logs first, you’re guessing — not troubleshooting.</em></blockquote><h3>/tmp</h3><p>Used for temporary files.</p><p><strong>Key point:</strong><br> Files here can be deleted automatically after reboot.</p><p>Never store anything important in /tmp.</p><h3>/bin and /sbin</h3><ul><li>/bin → Essential system commands (ls, cp, rm)</li><li>/sbin → System administration commands (mount, fsck, ip)</li></ul><p>If the system is broken and barely booting, these directories still work.</p><h3>/usr/bin</h3><p>Contains most user-level tools like:</p><ul><li>git</li><li>curl</li><li>python</li><li>vim</li></ul><p>This is where installed utilities live.</p><h3>/opt</h3><p>Used for optional or third-party software.</p><p><strong>Best practice:</strong><br>Custom or vendor applications should live here, not inside system directories.</p><h3>Part 2: Scenario-Based Troubleshooting (Thinking Like DevOps)</h3><p>Instead of memorizing commands, I practiced <strong>structured troubleshooting</strong>.</p><h3>Scenario 1: Service Not Starting After Reboot</h3><p><strong>Approach:</strong></p><ol><li>Check service status</li><li>Check logs</li><li>Check if it starts on boot</li></ol><p>This avoids random guessing and gives clear answers quickly.</p><h3>Scenario 2: High CPU Usage</h3><p>When a server feels slow:</p><ol><li>First identify <strong>which process</strong> is consuming CPU</li></ol><p>2. Note the PID</p><p>3. Understand <em>what</em> the process is before acting</p><p>Killing processes blindly is how outages happen.</p><h3>Scenario 3: Finding Service Logs</h3><p>For systemd-managed services:</p><ol><li>Logs are stored in <strong>journald</strong></li></ol><p>2. You can view historical logs or follow them in real time</p><p>Knowing this saves time when logs are not found in /var/log.</p><h3>Scenario 4: Permission Issues</h3><p>One of the most common Linux problems.</p><p>If a script says <strong>“Permission denied”</strong>:</p><ol><li>Check permissions</li></ol><p>2. Add execute permission</p><p>3. Verify and re-run</p><p>Simple, predictable, and very common in production.</p><h3>What I Learned on Day 07</h3><ul><li>Linux troubleshooting is about <strong>order</strong>, not commands.</li><li>Logs explain problems better than assumptions.</li><li>File system knowledge speeds up incident response.</li><li>Most production issues are repetitive and predictable.</li><li>DevOps is about <strong>understanding systems</strong>, not hacking fixes.</li></ul><h3>GitHub Repository (Completed Task)</h3><p>All required hands-on commands were executed on a Linux system.<br> The outputs were captured <strong>together in a single terminal session</strong> and attached as screenshots in the repository.</p><p>This ensures the work reflects <strong>actual execution</strong>, not theoretical answers.</p><p>📂 The complete <strong>Day 07 task</strong>, including:</p><ul><li>day-07-linux-fs-and-scenarios.md</li><li>Scenario-based solutions</li><li>Hands-on command evidence (screenshots)</li></ul><p>is available here:</p><p>👉 <strong>GitHub:</strong><br> https://github.com/deepanshudg45/90DaysOfDevOps/blob/master/2026/day-07/day-07-linux-fs-and-scenarios.md</p><h3>Final Thoughts</h3><p>Day 07 reinforced something important:</p><blockquote><em>Strong DevOps engineers don’t panic.<br>They know where to look.</em></blockquote><p>Linux is simple when you understand its structure.<br>Once that clicks, troubleshooting becomes logical instead of stressful.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da5c114fbaa2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Linux File Read & Write Basics]]></title>
            <link>https://medium.com/@gahatorideepwork/linux-file-read-write-basics-4c47aeb77cb3?source=rss-78bd8117e73b------2</link>
            <guid isPermaLink="false">https://medium.com/p/4c47aeb77cb3</guid>
            <category><![CDATA[debugging]]></category>
            <category><![CDATA[90daysofdevops]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Deepanshu Gahatori]]></dc:creator>
            <pubDate>Sat, 07 Feb 2026 14:55:15 GMT</pubDate>
            <atom:updated>2026-02-07T14:55:15.796Z</atom:updated>
            <content:encoded><![CDATA[<h4>Day 06 of the 90DaysOfDevOps journey was all about understanding one of the most basic but most important Linux skills — reading and writing text files.</h4><p>As simple as it sounds, this skill is used daily in DevOps while working with logs, configuration files, scripts, and automation outputs.</p><h3>Why File Handling Matters in DevOps</h3><p>In real DevOps work, almost everything is a text file:</p><ul><li>Application logs</li><li>System logs</li><li>YAML and JSON configs</li><li>Shell scripts</li><li>CI/CD pipeline files</li></ul><p>If you are comfortable reading and writing files from the terminal, debugging and automation become much easier.</p><h3>What I Practiced on Day 06</h3><p>The goal was simple:</p><ul><li>Create a file</li><li>Write content into it</li><li>Append new lines</li><li>Read the file fully and partially</li></ul><p>All using basic Linux commands.</p><h3>Step 1: Creating a File</h3><p>I started by creating an empty file using:</p><pre>touch notes.txt</pre><p>This command creates a file if it doesn’t exist.<br> It’s commonly used when preparing log files or placeholders for scripts.</p><h3>Step 2: Writing Data to a File</h3><p>To write content into the file, I used output redirection:</p><pre>echo &quot;It&#39;s day06 task of my 90DaysOfDevOps Journey&quot; &gt; notes.txt</pre><p>The &gt; operator writes data to the file and <strong>overwrites existing content</strong> if the file already has data.</p><p>This is useful when you want a clean file state.</p><h3>Step 3: Appending Data Safely</h3><p>To add more content without deleting existing data:</p><pre>echo &quot;I am enjoying this learning journey&quot; &gt;&gt; notes.txt</pre><p>The &gt;&gt; operator appends data safely.<br> This is how logs usually grow in real systems.</p><h3>Step 4: Writing and Displaying Output Together</h3><p>One very useful command I practiced was tee:</p><pre>echo &quot;Happy Learning Dosto&quot; | tee -a notes.txt</pre><p>This command:</p><ul><li>Displays output on the terminal</li><li>Writes the same output to the file</li></ul><p>In DevOps, tee is often used while debugging pipelines or capturing command output into log files.</p><h3>Step 5: Reading the File</h3><p>To read the entire file:</p><pre>cat notes.txt</pre><p>For partial reads:</p><pre>head -n 2 notes.txt<br>tail -n 2 notes.txt</pre><p>These commands are extremely useful when working with <strong>large log files</strong>, where reading everything is not practical.</p><h3>Key Learnings from Day 06</h3><ul><li>&gt; overwrites file content</li><li>&gt;&gt; appends content safely</li><li>tee is useful for logging and debugging</li><li>head and tail help analyze large files quickly</li><li>Linux file handling is a daily DevOps activity</li></ul><h3>Final Thoughts</h3><p>Day 06 may look simple, but these fundamentals are used everywhere in DevOps.</p><p>Strong basics make advanced topics like shell scripting, CI/CD pipelines, and cloud automation much easier to understand.</p><p>Slow progress with clarity is better than fast progress with confusion.</p><p>📎 <em>I have attached command outputs and screenshots in my GitHub repository for reference.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KCyNfR7c-gyvssF5x8IvdA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4c47aeb77cb3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Practical Linux Troubleshooting Runbook: CPU, Memory, Disk, Logs (Docker on Ubuntu)]]></title>
            <link>https://medium.com/@gahatorideepwork/a-practical-linux-troubleshooting-runbook-cpu-memory-disk-logs-docker-on-ubuntu-2e5feadbbdb0?source=rss-78bd8117e73b------2</link>
            <guid isPermaLink="false">https://medium.com/p/2e5feadbbdb0</guid>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[troubleshooting]]></category>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Deepanshu Gahatori]]></dc:creator>
            <pubDate>Sat, 07 Feb 2026 13:47:42 GMT</pubDate>
            <atom:updated>2026-02-07T13:57:25.940Z</atom:updated>
            <content:encoded><![CDATA[<h4>When systems break in production, theory doesn’t help,<strong>repeatable troubleshooting does</strong>.</h4><p>This post documents a real Linux troubleshooting drill focused on CPU, memory, disk, network, and logs, using Docker as the target service.</p><p>As part of my 90 Days of DevOps journey, Day 05 focuses on building a repeatable Linux troubleshooting routine. The goal is not to “fix” anything, but to build muscle memory for real incidents.</p><h3>Environment Overview</h3><ul><li>OS: Ubuntu 24.04.1 LTS (Noble)</li><li>Kernel: 6.6.x (WSL2)</li><li>Target service: docker (dockerd)</li><li>Context: Local Linux environment, production-style checks</li></ul><h3>Step 1: Confirm the Environment</h3><p>Before touching the service, always confirm where you are.</p><pre>uname -a<br>lsb_release -a</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l1q793wPh0iyuwxsNdhoUA.png" /></figure><p>This system runs on <strong>WSL2</strong>, which is important because:</p><ul><li>Disk IO behaves differently than bare metal</li><li>Networking uses Windows integration</li><li>Some warnings are expected and non-fatal</li></ul><p>Knowing this prevents chasing false positives.</p><h3>Step 2: Filesystem Sanity Check</h3><p>Never assume the filesystem is healthy.</p><pre>mkdir /tmp/runbook-demo<br>cp /etc/hosts /tmp/runbook-demo/hosts-copy-file<br>ls -l /tmp/runbook-demo</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*_tbBYNTKepAPGLvuFr_g5A.png" /></figure><p>Result:<br> ✔ Filesystem writable<br> ✔ No permission or IO errors</p><p>If this fails, stop here — nothing else matters.</p><h3>Step 3: CPU and Memory Snapshot</h3><p>Start wide, then narrow down.</p><pre>top<br>ps -o pid,pcpu,pmem,comm -p $(pidof dockerd)<br>free -h</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/995/1*rxwGBwb18bkKdWk0Qx2IlQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z-TI5A_TcyffARRbcjEZCQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*2-G4B-KLAE4-8fvbmAyvNw.png" /></figure><p>Findings:</p><ul><li>Load average near zero</li><li>dockerd &lt;1% CPU and memory</li><li>~6.8GiB memory available</li><li>No swap usage</li></ul><p>Conclusion: <strong>No CPU or memory pressure</strong></p><h3>Step 4: Disk and IO Health</h3><p>Disk pressure causes slow systems long before disks fill up.</p><pre>df -h<br>sudo du -sh /var/log<br>iostat<br>vmstat 1 5<br>dstat -cdnm</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/888/1*RkbZzcBs8mrZLkzSCon9Ew.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/677/1*5RZFbSYrbwnz7YWpynceqA.png" /></figure><p>Findings:</p><ul><li>Root filesystem almost empty</li><li>/var/log ~384MB (safe)</li><li>IO wait ~0%</li><li>No swap activity</li></ul><p>Snap mounts show 100% usage — <strong>expected behavior</strong>, not an issue.</p><h3>Step 5: Network Verification</h3><p>Check what the service is exposing.</p><pre>sudo ss -lx | grep docker</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/1*BkqoxSlY0CeOXv40KENcIQ.png" /></figure><p>Result:</p><ul><li>Docker listens only on Unix sockets</li><li>No exposed TCP ports</li></ul><p>API health check:</p><pre>curl --unix-socket /var/run/docker.sock http://localhost/_ping</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/1*nSa_RnbaZyxUD7vGmxSjQg.png" /></figure><p>Response: OK</p><p>This confirms Docker is responsive.</p><h3>Step 6: Log Analysis</h3><p>Logs come <strong>after</strong> resource checks — not before.</p><pre>journalctl -u docker -n 50<br>tail -n 50 /var/log/syslog</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o5n-Vv-h1nq2KYFVYZ38FA.png" /></figure><p>Observations:</p><ul><li>Docker starts cleanly</li><li>Repeated CDI/containerd warnings</li><li>Known WSL-related messages</li><li>No crash loops or restarts</li></ul><p>Key lesson: <strong>Warnings ≠ incidents</strong></p><h3>Final Assessment</h3><ul><li>System is healthy</li><li>Docker is stable and responsive</li><li>No CPU, memory, disk, or network bottlenecks</li><li>Log warnings are non-fatal and environment-specific</li></ul><p>This is what “normal” looks like.</p><h3>If This Worsens (Escalation Plan)</h3><ol><li><strong>Immediate containment</strong></li></ol><ul><li>systemctl restart docker</li></ul><p><strong>2. Deeper diagnostics</strong></p><ul><li>docker stats dockerd --debug</li></ul><p><strong>3. Root cause analysis</strong></p><ul><li>Inspect container-level logs</li><li>Capture strace if CPU spikes</li><li>Review container restart behavior</li></ul><h3>Why This Matters?</h3><p>This is how real on-call engineers work:</p><ul><li>Verify basics</li><li>Observe before acting</li><li>Avoid assumptions</li><li>Escalate methodically</li></ul><p>A runbook like this turns panic into process.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2e5feadbbdb0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[90DaysOfDevOps: Day-04]]></title>
            <link>https://medium.com/@gahatorideepwork/90daysofdevops-day-04-f0124c807a25?source=rss-78bd8117e73b------2</link>
            <guid isPermaLink="false">https://medium.com/p/f0124c807a25</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[troubleshooting]]></category>
            <category><![CDATA[linux-commands]]></category>
            <category><![CDATA[linux-process-management]]></category>
            <dc:creator><![CDATA[Deepanshu Gahatori]]></dc:creator>
            <pubDate>Fri, 30 Jan 2026 08:39:02 GMT</pubDate>
            <atom:updated>2026-02-07T14:57:03.201Z</atom:updated>
            <content:encoded><![CDATA[<h3>Linux Practice — Processes, Services, and Logs</h3><h4>Day 04 of 90DaysOfDevOps</h4><h3>Hands-On Linux Practice — Processes, Services, and Logs</h3><p>Linux fundamentals are best learned by <strong>running real commands</strong>, not just reading about them.<br>On Day 04 of my Linux practice, I focused on understanding <strong>processes</strong>, <strong>systemd services</strong>, and <strong>logs</strong> using actual commands and real output.</p><p>This post documents what I ran, what I observed, and how these pieces connect in real systems.</p><h3>Checking Running Processes</h3><p>I started by checking which processes were running in my current terminal session.</p><p><strong>Command used:</strong></p><pre>ps</pre><p>This command shows processes attached to the current TTY.<br> It confirmed that my shell (bash) and the ps command itself were running.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Go1cWIgg6krkRvAjpWapyg.png" /><figcaption>‘ps’ output</figcaption></figure><p>To get a full system-wide view, I ran:</p><pre>ps aux</pre><p>From this output, I observed:</p><ul><li>systemd running as PID 1, confirming it is the init system</li><li>Most background services running as root</li><li>Useful CPU and memory visibility for each process</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Go1cWIgg6krkRvAjpWapyg.png" /><figcaption><em>‘ps aux’ output</em></figcaption></figure><h3>Monitoring Processes in Real Time</h3><p>Next, I used top to see how the system behaves in real time.</p><pre>top</pre><p>Key observations:</p><ul><li>Load average was near zero, meaning the system was idle</li><li>Most processes were in a sleeping state</li><li>Memory usage was low and stable</li></ul><p>This command is extremely useful during performance troubleshooting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*itDQDe9QIEWWOJ6_PdgULQ.png" /><figcaption><em>‘top’ output</em></figcaption></figure><h3>Inspecting a Specific Process (nginx)</h3><p>Since services often run multiple processes, I checked how nginx behaves at the process level.</p><pre>pgrep nginx</pre><p>This returned multiple PIDs, which confirms:</p><ul><li>nginx uses a <strong>master process</strong></li><li>Multiple <strong>worker processes</strong> handle requests</li></ul><p>This is a common architecture for high-performance servers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*_vJ8E8tOBm4cd0WhKx7AkQ.png" /><figcaption><em>‘pgrep nginx’ output</em></figcaption></figure><h3>Inspecting a Systemd Service</h3><p>Processes are one thing — services are another.<br> I inspected nginx using systemd.</p><pre>systemctl status nginx</pre><p>From this output, I learned:</p><ul><li>nginx service is <strong>active (running)</strong></li><li>The main PID is clearly shown</li><li>Worker processes are grouped under the service’s cgroup</li><li>systemd fully manages nginx lifecycle</li></ul><p>This makes it easy to debug service-level issues.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3tc0sHcWDSIFFSzXSPMQvw.png" /><figcaption>‘systemctl status nginx’ output</figcaption></figure><h3>Viewing All Running Services</h3><p>To understand what else is running on the system, I listed all active services.</p><pre>systemctl list-units --type=service --state=running</pre><p>This command showed:</p><ul><li>Core system services</li><li>nginx, docker, cron, and logging services</li><li>A clean way to identify unexpected or failed services</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E8bzuya9LDxdyW8Niik2PA.png" /><figcaption><em>running services list output</em></figcaption></figure><h3>Working With Logs (Real Troubleshooting Skill)</h3><p>Logs are where real debugging happens.</p><p>I inspected Docker logs using systemd’s journal:</p><pre>journalctl -u docker</pre><p>From the logs, I observed:</p><ul><li>Docker daemon startup sequence</li><li>Initialization steps and warnings</li><li>Confirmation that the service started successfully</li></ul><p>This reinforced how powerful centralized logging with journalctl is.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7Tl5ODj7S6uvss07Qds8Bw.png" /><figcaption><em>docker journal logs</em></figcaption></figure><h3>Checking Authentication Logs</h3><p>Finally, I inspected authentication and security-related logs.</p><pre>tail -n 50 /var/log/auth.log</pre><p>This showed:</p><ul><li>User login sessions</li><li>sudo command usage</li><li>cron activity</li><li>PAM authentication messages</li></ul><p>This file is critical for <strong>security auditing</strong> and <strong>incident investigation</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-B4AY5-DKVqwB80YI9Xm5w.png" /><figcaption><em>auth.log output</em></figcaption></figure><h3>Mini Troubleshooting Flow I Practiced</h3><p>When a service doesn’t work, I now follow this simple flow:</p><ol><li><strong>Is the process running?</strong></li></ol><ul><li>pgrep nginx</li></ul><ol><li><strong>Is the service healthy?</strong></li></ol><ul><li>systemctl status nginx</li></ul><ol><li><strong>Are there recent errors?</strong></li></ol><ul><li>journalctl -u nginx --since &quot;15 minutes ago&quot;</li></ul><ol><li><strong>Is the system under load?</strong></li></ol><ul><li>top</li></ul><p>This approach avoids guessing and speeds up root-cause analysis.</p><h3>Key Takeaways From Day 04</h3><ol><li>A <strong>service can run multiple processes</strong></li><li>systemctl manages services, not individual PIDs</li></ol><p>3. Logs should always be checked early during failures</p><p>4. Effective troubleshooting combines:</p><ul><li>process inspection</li><li>service status</li><li>log analysis</li></ul><h3>Final Thoughts</h3><p>This hands-on practice helped me connect the dots between <strong>processes</strong>, <strong>services</strong>, and <strong>logs</strong> — which is essential for real-world Linux and DevOps work.</p><p>If you’re learning Linux, don’t just read commands — <strong>run them and observe the output</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f0124c807a25" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>