<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sreekanth Kuruba</title>
    <description>The latest articles on DEV Community by Sreekanth Kuruba (@sreekanth_kuruba_91721e5d).</description>
    <link>https://dev.to/sreekanth_kuruba_91721e5d</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3286476%2Fc7a306ec-1c67-4d33-901a-1148effc29ce.jpg</url>
      <title>DEV Community: Sreekanth Kuruba</title>
      <link>https://dev.to/sreekanth_kuruba_91721e5d</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sreekanth_kuruba_91721e5d"/>
    <language>en</language>
    <item>
      <title>How CoreDNS Powers Service Discovery in Kubernetes</title>
      <dc:creator>Sreekanth Kuruba</dc:creator>
      <pubDate>Tue, 23 Jun 2026 12:00:47 +0000</pubDate>
      <link>https://dev.to/sreekanth_kuruba_91721e5d/how-coredns-powers-service-discovery-in-kubernetes-5fp1</link>
      <guid>https://dev.to/sreekanth_kuruba_91721e5d/how-coredns-powers-service-discovery-in-kubernetes-5fp1</guid>
      <description>&lt;p&gt;CoreDNS is the DNS server that powers service discovery in Kubernetes. This post explains how Pods translate service names into IP addresses, explores common DNS records, and provides practical troubleshooting commands for debugging connectivity issues.&lt;/p&gt;




&lt;p&gt;In the previous post, we learned how Kubernetes Services provide stable virtual IPs for Pods.&lt;/p&gt;

&lt;p&gt;But another question remains:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do applications find those Services?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Applications rarely communicate using IP addresses. Instead, they use names such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;backend-service
mysql-service
redis-service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So how does a Pod translate those names into IP addresses?&lt;/p&gt;

&lt;p&gt;That's where &lt;strong&gt;CoreDNS&lt;/strong&gt; comes in.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Do We Need DNS in Kubernetes?
&lt;/h2&gt;

&lt;p&gt;Imagine a frontend application connecting to a backend service.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Without DNS:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Backend IP = 10.96.15.21
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the Service IP changes, the application configuration must change.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;With DNS:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;backend-service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;CoreDNS automatically resolves the name to the correct Service IP.&lt;/p&gt;

&lt;p&gt;This allows applications to communicate without knowing actual IP addresses.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Is CoreDNS?
&lt;/h2&gt;

&lt;p&gt;CoreDNS is the DNS server running inside the Kubernetes cluster.&lt;/p&gt;

&lt;p&gt;It watches Kubernetes resources and automatically creates DNS records for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Services&lt;/li&gt;
&lt;li&gt;Pods (optional)&lt;/li&gt;
&lt;li&gt;Namespaces&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Applications can then use service names instead of IP addresses.&lt;/p&gt;




&lt;h2&gt;
  
  
  Where Does CoreDNS Run?
&lt;/h2&gt;

&lt;p&gt;CoreDNS runs as Pods inside the &lt;code&gt;kube-system&lt;/code&gt; namespace.&lt;/p&gt;

&lt;p&gt;Verify this with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get pods &lt;span class="nt"&gt;-n&lt;/span&gt; kube-system
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Typical output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;coredns-xxxxx
coredns-yyyyy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Multiple replicas provide high availability.&lt;/p&gt;




&lt;h2&gt;
  
  
  How Service Discovery Works
&lt;/h2&gt;

&lt;p&gt;Suppose we have:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Service Name: backend-service
Namespace: default
ClusterIP: 10.96.15.21
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A Pod sends:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;backend-service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;CoreDNS resolves it to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;10.96.15.21
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The application never needs to know the actual IP address.&lt;/p&gt;




&lt;h2&gt;
  
  
  Kubernetes DNS Naming
&lt;/h2&gt;

&lt;p&gt;Every Service receives a fully qualified domain name (FQDN):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;service-name.namespace.svc.cluster.local
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;backend-service.default.svc.cluster.local
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Most applications use the shorter name:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;backend-service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Kubernetes automatically appends the remaining DNS suffix.&lt;/p&gt;




&lt;h2&gt;
  
  
  DNS Lookup Flow
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Application Pod
        ↓
DNS Query
        ↓
CoreDNS
        ↓
Service ClusterIP
        ↓
kube-proxy
        ↓
Backend Pod
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The entire process usually takes only a few milliseconds.&lt;/p&gt;




&lt;h2&gt;
  
  
  Important DNS Records
&lt;/h2&gt;

&lt;h3&gt;
  
  
  ClusterIP Service
&lt;/h3&gt;

&lt;p&gt;CoreDNS returns the Service IP:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;backend-service → 10.96.15.21
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Headless Service
&lt;/h3&gt;

&lt;p&gt;If the Service uses:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;clusterIP&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;None&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;CoreDNS returns individual Pod IPs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;database-0
database-1
database-2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is commonly used by StatefulSets.&lt;/p&gt;




&lt;h2&gt;
  
  
  Common DNS Problems and Solutions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Service name not resolving?
&lt;/h3&gt;

&lt;p&gt;Verify the Service exists:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get svc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Test DNS from a Pod
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl &lt;span class="nb"&gt;exec&lt;/span&gt; &lt;span class="nt"&gt;-it&lt;/span&gt; &amp;lt;pod&amp;gt; &lt;span class="nt"&gt;--&lt;/span&gt; nslookup backend-service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Check CoreDNS Pods
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get pods &lt;span class="nt"&gt;-n&lt;/span&gt; kube-system
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. View CoreDNS Logs
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl logs &lt;span class="nt"&gt;-n&lt;/span&gt; kube-system deployment/coredns
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Why CoreDNS Matters
&lt;/h2&gt;

&lt;p&gt;Without CoreDNS:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Applications would need hardcoded IP addresses&lt;/li&gt;
&lt;li&gt;Configuration changes would happen frequently&lt;/li&gt;
&lt;li&gt;Service discovery would become difficult&lt;/li&gt;
&lt;li&gt;Microservices communication would break easily&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;CoreDNS makes Kubernetes applications independent of changing IP addresses.&lt;/p&gt;




&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;Pods communicate using names, not IP addresses.&lt;/p&gt;

&lt;p&gt;CoreDNS acts as the phonebook of Kubernetes, translating Service names into IP addresses.&lt;/p&gt;

&lt;p&gt;Understanding CoreDNS helps you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Debug service discovery problems&lt;/li&gt;
&lt;li&gt;Troubleshoot application connectivity&lt;/li&gt;
&lt;li&gt;Understand Kubernetes networking better&lt;/li&gt;
&lt;li&gt;Build resilient microservices&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Next in the Series:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Ingress Explained – How External Traffic Enters Your Kubernetes Cluster.&lt;/p&gt;




</description>
      <category>kubernetes</category>
      <category>devops</category>
      <category>cloudnative</category>
      <category>networking</category>
    </item>
    <item>
      <title>Linux Networking Basics for Beginners</title>
      <dc:creator>Sreekanth Kuruba</dc:creator>
      <pubDate>Tue, 23 Jun 2026 05:18:20 +0000</pubDate>
      <link>https://dev.to/sreekanth_kuruba_91721e5d/linux-networking-basics-for-beginners-3e2e</link>
      <guid>https://dev.to/sreekanth_kuruba_91721e5d/linux-networking-basics-for-beginners-3e2e</guid>
      <description>&lt;p&gt;Most Linux “server down” problems are not actually system failures.&lt;/p&gt;

&lt;p&gt;They are network issues.&lt;/p&gt;

&lt;p&gt;👉 The system is running fine&lt;br&gt;
👉 But it cannot talk to the outside world&lt;/p&gt;

&lt;p&gt;That’s why networking is one of the most critical skills in Linux, DevOps, and cloud environments.&lt;/p&gt;

&lt;p&gt;Let’s simplify it.&lt;/p&gt;


&lt;h2&gt;
  
  
  Basic Networking Concepts (Must Know First)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is an IP Address?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An IP address is a unique address assigned to a device in a network.&lt;/p&gt;

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

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

&lt;/div&gt;



&lt;p&gt;👉 Used for communication between systems.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;What is localhost (&lt;code&gt;127.0.0.1&lt;/code&gt;)?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;localhost&lt;/code&gt; refers to your own computer.&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;👉 This means “your own computer”&lt;/p&gt;

&lt;p&gt;Used for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;testing apps&lt;/li&gt;
&lt;li&gt;local development&lt;/li&gt;
&lt;li&gt;debugging services&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;What is DNS?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;DNS (Domain Name System) converts domain names into IP addresses.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;google.com → 142.x.x.x
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 Without DNS, we would need to remember IPs manually.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;What is a Port?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Ports are like “doors” for services.&lt;/p&gt;

&lt;p&gt;Ports are communication endpoints used by applications.&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Port 80 → HTTP&lt;/li&gt;
&lt;li&gt;Port 443 → HTTPS&lt;/li&gt;
&lt;li&gt;Port 22 → SSH&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 One server can run multiple services using different ports.&lt;/p&gt;




&lt;h3&gt;
  
  
  1. Check Internet Connectivity with &lt;code&gt;ping&lt;/code&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ping google.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Limit requests:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;ping -c 4 google.com
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 First command used in troubleshooting.&lt;/p&gt;

&lt;p&gt;Checks:&lt;/p&gt;

&lt;p&gt;is host reachable?&lt;br&gt;
is network working?&lt;/p&gt;


&lt;h3&gt;
  
  
  2. Test Web Requests with &lt;code&gt;curl&lt;/code&gt;
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl google.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Headers only:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;curl -I google.com   #&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Show only HTTP headers
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Verbose mode:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;curl -v google.com   #&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Verbose &lt;span class="o"&gt;(&lt;/span&gt;detailed output&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Used for:&lt;/p&gt;

&lt;p&gt;API testing&lt;br&gt;
checking web services&lt;br&gt;
debugging HTTP issues&lt;/p&gt;


&lt;h3&gt;
  
  
  3. Check DNS Resolution
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nslookup google.com

&lt;span class="c"&gt;# More detailed DNS lookup&lt;/span&gt;
dig google.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;👉 If DNS fails:&lt;/p&gt;

&lt;p&gt;website won’t open&lt;br&gt;
even if internet is working&lt;/p&gt;


&lt;h3&gt;
  
  
  4. Check Your IP Address
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ip a          &lt;span class="c"&gt;# full network interface details&lt;/span&gt;
&lt;span class="nb"&gt;hostname&lt;/span&gt; &lt;span class="nt"&gt;-I&lt;/span&gt;   &lt;span class="c"&gt;# Show only IP addresses&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;👉 Shows your system’s network identity&lt;/p&gt;


&lt;h3&gt;
  
  
  5. Check Routing path
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ip route
ip route | &lt;span class="nb"&gt;grep &lt;/span&gt;default   &lt;span class="c"&gt;# Show default gateway&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;👉 Shows how traffic leaves your system&lt;/p&gt;


&lt;h3&gt;
  
  
  6. Check Open Ports
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ss &lt;span class="nt"&gt;-tuln&lt;/span&gt;               &lt;span class="c"&gt;# Show listening ports&lt;/span&gt;
ss &lt;span class="nt"&gt;-tuln&lt;/span&gt; | &lt;span class="nb"&gt;grep&lt;/span&gt; :80    &lt;span class="c"&gt;# Check specific port&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Shows which services are listening on your system.&lt;/p&gt;

&lt;p&gt;Modern replacement for &lt;code&gt;netstat&lt;/code&gt;.&lt;/p&gt;


&lt;h3&gt;
  
  
  7. Trace Network Path with &lt;code&gt;traceroute&lt;/code&gt;
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;traceroute google.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Install if needed:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;traceroute    &lt;span class="c"&gt;# Ubuntu/Debian&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;dnf &lt;span class="nb"&gt;install &lt;/span&gt;traceroute    &lt;span class="c"&gt;# Fedora/RHEL&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 Shows where delay or failure happens in network path&lt;/p&gt;




&lt;h3&gt;
  
  
  8. Enhanced Traceroute with &lt;code&gt;mtr&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;mtr&lt;/strong&gt; is a powerful combination of &lt;strong&gt;ping&lt;/strong&gt; and &lt;strong&gt;traceroute&lt;/strong&gt;. It continuously monitors the connection.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mtr google.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Install if needed:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;mtr
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 Combines:&lt;/p&gt;

&lt;p&gt;ping&lt;br&gt;
traceroute&lt;/p&gt;

&lt;p&gt;Real-time network diagnostics tool&lt;/p&gt;




&lt;h3&gt;
  
  
  Simple Troubleshooting Flow (VERY IMPORTANT)
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;ping 8.8.8.8        → check internet&lt;/li&gt;
&lt;li&gt;ping google.com     → check DNS&lt;/li&gt;
&lt;li&gt;ip a                → check IP&lt;/li&gt;
&lt;li&gt;ip route            → check routing&lt;/li&gt;
&lt;li&gt;curl -I site        → check HTTP&lt;/li&gt;
&lt;li&gt;traceroute / mtr    → find failure point&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;👉 This is real DevOps incident workflow&lt;/p&gt;




&lt;h3&gt;
  
  
  ⚠️ Common Beginner Mistakes
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;assuming internet is down (when DNS is broken)&lt;/li&gt;
&lt;li&gt;not checking IP address first&lt;/li&gt;
&lt;li&gt;using old tools (ifconfig, netstat)&lt;/li&gt;
&lt;li&gt;routing checks&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Simple Mental Model&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Think of networking like delivery:&lt;/p&gt;

&lt;p&gt;IP → house address&lt;br&gt;
DNS → contact name → address lookup&lt;br&gt;
Port → door number&lt;br&gt;
Routing → delivery path&lt;br&gt;
ping → “are you there?”&lt;/p&gt;




&lt;h3&gt;
  
  
  Summary
&lt;/h3&gt;

&lt;p&gt;You learned:&lt;/p&gt;

&lt;p&gt;IP address basics&lt;br&gt;
localhost (127.0.0.1)&lt;br&gt;
DNS resolution&lt;br&gt;
ports (80, 443, 22)&lt;br&gt;
&lt;code&gt;ping&lt;/code&gt; → connectivity&lt;br&gt;
&lt;code&gt;curl&lt;/code&gt; → web/API testing&lt;br&gt;
&lt;code&gt;nslookup&lt;/code&gt;, &lt;code&gt;dig&lt;/code&gt; → DNS tools&lt;br&gt;
&lt;code&gt;ip a&lt;/code&gt;, &lt;code&gt;ip route&lt;/code&gt; → network config&lt;br&gt;
&lt;code&gt;ss&lt;/code&gt; → open ports&lt;br&gt;
&lt;code&gt;traceroute&lt;/code&gt;, &lt;code&gt;mtr&lt;/code&gt; → path debugging&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Why This Matters&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Networking is the backbone of:&lt;/p&gt;

&lt;p&gt;cloud systems&lt;br&gt;
DevOps pipelines&lt;br&gt;
APIs&lt;br&gt;
production servers&lt;/p&gt;

&lt;p&gt;👉 If networking breaks, everything breaks&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Next Post:&lt;/strong&gt;&lt;br&gt;
Linux Logs Explained Simply,(journalctl, /var/log)&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Question for You&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Have you ever faced a situation where:&lt;/p&gt;

&lt;p&gt;internet was working&lt;br&gt;
but website still didn’t load?&lt;/p&gt;

&lt;p&gt;That’s usually DNS — I’ll show debugging in Part 8.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>devops</category>
      <category>beginners</category>
      <category>sysadmin</category>
    </item>
    <item>
      <title>Real production lesson: Logs can fill a server faster than applications. Always monitor /var/log growth before it becomes an outage. 

#sre #devops</title>
      <dc:creator>Sreekanth Kuruba</dc:creator>
      <pubDate>Mon, 22 Jun 2026 11:33:25 +0000</pubDate>
      <link>https://dev.to/sreekanth_kuruba_91721e5d/real-production-lesson-logs-can-fill-a-server-faster-than-applications-always-monitor-varlog-22ol</link>
      <guid>https://dev.to/sreekanth_kuruba_91721e5d/real-production-lesson-logs-can-fill-a-server-faster-than-applications-always-monitor-varlog-22ol</guid>
      <description></description>
      <category>devops</category>
      <category>linux</category>
      <category>monitoring</category>
      <category>sre</category>
    </item>
    <item>
      <title>Real production lesson: Logs can fill a server faster than applications. Always monitor /var/log growth before it becomes an outage. #sre #devops</title>
      <dc:creator>Sreekanth Kuruba</dc:creator>
      <pubDate>Mon, 22 Jun 2026 11:33:02 +0000</pubDate>
      <link>https://dev.to/sreekanth_kuruba_91721e5d/real-production-lesson-logs-can-fill-a-server-faster-than-applications-always-monitor-varlog-1i4b</link>
      <guid>https://dev.to/sreekanth_kuruba_91721e5d/real-production-lesson-logs-can-fill-a-server-faster-than-applications-always-monitor-varlog-1i4b</guid>
      <description></description>
      <category>devops</category>
      <category>linux</category>
      <category>monitoring</category>
      <category>sre</category>
    </item>
    <item>
      <title>SSH Sessions Dropping Frequently? Here's Exactly How I Troubleshoot It</title>
      <dc:creator>Sreekanth Kuruba</dc:creator>
      <pubDate>Sat, 20 Jun 2026 07:56:43 +0000</pubDate>
      <link>https://dev.to/sreekanth_kuruba_91721e5d/ssh-sessions-dropping-frequently-heres-exactly-how-i-troubleshoot-it-562p</link>
      <guid>https://dev.to/sreekanth_kuruba_91721e5d/ssh-sessions-dropping-frequently-heres-exactly-how-i-troubleshoot-it-562p</guid>
      <description>&lt;p&gt;Ever had your SSH session disconnect right in the middle of a production deployment?&lt;/p&gt;

&lt;p&gt;I have.&lt;/p&gt;

&lt;p&gt;After getting burned by it a few times, I created a simple troubleshooting checklist that helps me quickly find the root cause.&lt;/p&gt;




&lt;p&gt;You're in the middle of a critical deployment or debugging session on a production server.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Connection to 172.20.10.5 closed by remote host.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You reconnect… and it happens again 5 minutes later.&lt;/p&gt;

&lt;p&gt;If this sounds familiar, you're not alone. SSH disconnections are one of the most frustrating issues for developers and DevOps engineers.&lt;/p&gt;

&lt;p&gt;Here's the exact checklist I use to diagnose and fix recurring SSH disconnect problems.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Check Network Connectivity First
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ping &amp;lt;server-ip&amp;gt;
traceroute &amp;lt;server-ip&amp;gt;
mtr &amp;lt;server-ip&amp;gt;          &lt;span class="c"&gt;# Great for intermittent network issues&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Look for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Packet loss&lt;/li&gt;
&lt;li&gt;High latency&lt;/li&gt;
&lt;li&gt;Unstable VPN connections&lt;/li&gt;
&lt;li&gt;ISP connectivity issues&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sometimes the problem isn't the server at all.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Check Server Resource Usage
&lt;/h2&gt;

&lt;p&gt;Overloaded servers often become unresponsive and can drop SSH sessions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;top
htop
free &lt;span class="nt"&gt;-h&lt;/span&gt;
&lt;span class="nb"&gt;uptime&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Pay special attention to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;High load average&lt;/li&gt;
&lt;li&gt;Very low available memory&lt;/li&gt;
&lt;li&gt;OOM (Out Of Memory) Killer activity&lt;/li&gt;
&lt;li&gt;CPU saturation&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  3. Check SSH Logs
&lt;/h2&gt;

&lt;p&gt;SSH logs often tell you exactly why the connection was terminated.&lt;/p&gt;

&lt;h3&gt;
  
  
  Ubuntu/Debian
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo tail&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; /var/log/auth.log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  RHEL/CentOS/Rocky
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo tail&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; /var/log/secure
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Modern systems
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;journalctl &lt;span class="nt"&gt;-u&lt;/span&gt; sshd &lt;span class="nt"&gt;-f&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Look for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Timeout messages&lt;/li&gt;
&lt;li&gt;Authentication failures&lt;/li&gt;
&lt;li&gt;SSH daemon restarts&lt;/li&gt;
&lt;li&gt;Connection errors&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  4. Fix SSH Timeout Settings (Server Side)
&lt;/h2&gt;

&lt;p&gt;Edit the SSH daemon configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;nano /etc/ssh/sshd_config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add or modify:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ClientAliveInterval 300
ClientAliveCountMax 3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Send a keepalive packet every 300 seconds.&lt;/li&gt;
&lt;li&gt;Disconnect only after 3 failed responses.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Restart SSH:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl restart sshd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  5. Configure Client-Side Keepalive
&lt;/h2&gt;

&lt;p&gt;Create or edit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nano ~/.ssh/config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Host &lt;span class="k"&gt;*&lt;/span&gt;
    ServerAliveInterval 60
    ServerAliveCountMax 3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This helps prevent many idle SSH disconnections.&lt;/p&gt;




&lt;h2&gt;
  
  
  6. Check Firewalls, VPNs &amp;amp; Load Balancers
&lt;/h2&gt;

&lt;p&gt;Some common culprits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Firewall idle timeouts&lt;/li&gt;
&lt;li&gt;Cloud load balancer timeouts&lt;/li&gt;
&lt;li&gt;VPN session timeouts&lt;/li&gt;
&lt;li&gt;NAT session expiration&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Always troubleshoot the entire network path, not just the server.&lt;/p&gt;




&lt;h2&gt;
  
  
  7. Use &lt;code&gt;tmux&lt;/code&gt; or &lt;code&gt;screen&lt;/code&gt; (A Life Saver)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;tmux
&lt;span class="c"&gt;# Do your work&lt;/span&gt;
Ctrl + B &lt;span class="k"&gt;then &lt;/span&gt;D   &lt;span class="c"&gt;# Detach&lt;/span&gt;
tmux attach       &lt;span class="c"&gt;# Reconnect later&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is a must-have habit for anyone working on Linux servers.&lt;/p&gt;

&lt;p&gt;Even if your SSH session disconnects, your processes keep running.&lt;/p&gt;




&lt;h2&gt;
  
  
  8. Check System Limits
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;ulimit&lt;/span&gt; &lt;span class="nt"&gt;-a&lt;/span&gt;
&lt;span class="nb"&gt;cat&lt;/span&gt; /etc/security/limits.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Low limits can sometimes cause unexpected connection issues under heavy load.&lt;/p&gt;




&lt;h2&gt;
  
  
  Bonus Tip: Enable SSH Debugging
&lt;/h2&gt;

&lt;p&gt;If the issue is difficult to reproduce:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh &lt;span class="nt"&gt;-vvv&lt;/span&gt; user@server-ip
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The verbose output often reveals:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Authentication issues&lt;/li&gt;
&lt;li&gt;Timeout problems&lt;/li&gt;
&lt;li&gt;Network interruptions&lt;/li&gt;
&lt;li&gt;Key exchange failures&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  A Real Production Incident
&lt;/h2&gt;

&lt;p&gt;During a late-night deployment, our SSH sessions kept disconnecting every 3–4 minutes.&lt;/p&gt;

&lt;p&gt;We initially suspected the server itself. CPU and memory looked fine, and SSH logs showed nothing unusual.&lt;/p&gt;

&lt;p&gt;The actual culprit?&lt;/p&gt;

&lt;p&gt;A firewall between our workstation and the server had an aggressive idle timeout configured.&lt;/p&gt;

&lt;p&gt;Increasing the timeout and enabling SSH keepalives fixed the issue completely.&lt;/p&gt;

&lt;p&gt;That incident taught me an important lesson:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Don't just troubleshoot the server. Troubleshoot the entire path between your machine and the server.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  My SSH Troubleshooting Flow
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SSH Keeps Disconnecting
        ↓
1. Network (ping/mtr)
        ↓
2. Server Resources (top/free)
        ↓
3. SSH Logs
        ↓
4. Timeout Settings (Server + Client)
        ↓
5. Firewall / LB / VPN
        ↓
6. Use tmux (always)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Most SSH disconnections usually come down to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Idle timeout settings&lt;/li&gt;
&lt;li&gt;Unstable network connections&lt;/li&gt;
&lt;li&gt;Resource exhaustion&lt;/li&gt;
&lt;li&gt;Firewall or VPN timeouts&lt;/li&gt;
&lt;li&gt;Missing keepalive configuration&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One final tip: I never perform deployments directly in a normal SSH session anymore.&lt;/p&gt;

&lt;p&gt;Everything runs inside &lt;code&gt;tmux&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Even if my connection drops, my work keeps running.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Have you ever faced a strange SSH disconnect issue? I'd love to hear your experience in the comments.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>devops</category>
      <category>ssh</category>
      <category>troubleshooting</category>
    </item>
    <item>
      <title>Linux Disk Usage Explained Simply</title>
      <dc:creator>Sreekanth Kuruba</dc:creator>
      <pubDate>Wed, 17 Jun 2026 03:00:00 +0000</pubDate>
      <link>https://dev.to/sreekanth_kuruba_91721e5d/linux-disk-usage-explained-simply-46l2</link>
      <guid>https://dev.to/sreekanth_kuruba_91721e5d/linux-disk-usage-explained-simply-46l2</guid>
      <description>&lt;p&gt;One of the fastest ways to break a Linux system is this:&lt;/p&gt;

&lt;p&gt;❌ Running out of disk space&lt;/p&gt;

&lt;p&gt;When disk fills up:&lt;/p&gt;

&lt;p&gt;apps crash&lt;br&gt;
logs stop writing&lt;br&gt;
deployments fail&lt;br&gt;
servers become unstable&lt;/p&gt;

&lt;p&gt;👉 That’s why disk usage monitoring is critical in Linux and DevOps.&lt;/p&gt;

&lt;p&gt;Let’s simplify it.&lt;/p&gt;


&lt;h2&gt;
  
  
  Disk Usage Basics (You Must Know This First)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is Storage in Linux?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Storage is where Linux keeps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Files&lt;/li&gt;
&lt;li&gt;Applications&lt;/li&gt;
&lt;li&gt;Logs&lt;/li&gt;
&lt;li&gt;Databases&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;HDD&lt;/li&gt;
&lt;li&gt;SSD&lt;/li&gt;
&lt;li&gt;Cloud volumes (AWS, etc.)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If storage becomes full:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Applications may crash&lt;/li&gt;
&lt;li&gt;Logs may stop writing&lt;/li&gt;
&lt;li&gt;System can become unstable&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Linux uses storage through filesystems.&lt;/p&gt;


&lt;h3&gt;
  
  
  What is a Filesystem?
&lt;/h3&gt;

&lt;p&gt;A filesystem is how Linux organizes storage.&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ext4&lt;/li&gt;
&lt;li&gt;xfs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Linux mounts filesystems into directories like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;/&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/home&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/var&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;
  
  
  File Size vs Disk Usage
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;File size&lt;/strong&gt; → Size of a single file&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Disk usage&lt;/strong&gt; → Total space consumed by files and directories&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;ls -lh&lt;/code&gt; → Check file size&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;du -sh&lt;/code&gt; → Check directory disk usage&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;
  
  
  What is Mounting?
&lt;/h3&gt;

&lt;p&gt;Linux attaches storage devices to directories using a process called mounting.&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;/&lt;/code&gt; → Main filesystem&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/home&lt;/code&gt; → User files&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/var&lt;/code&gt; → Logs and application data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is why &lt;code&gt;df -h&lt;/code&gt; shows a &lt;strong&gt;Mounted on&lt;/strong&gt; column.&lt;/p&gt;


&lt;h3&gt;
  
  
  1. Check Overall Disk Usage with &lt;code&gt;df&lt;/code&gt;
&lt;/h3&gt;


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

&lt;/div&gt;


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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Filesystem      Size  Used  Avail  Use%  Mounted on
/dev/sda1        50G   32G   18G   65%   /
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Meaning:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Size → Total disk&lt;/li&gt;
&lt;li&gt;Used → used space&lt;/li&gt;
&lt;li&gt;Avail → Free space&lt;/li&gt;
&lt;li&gt;Use% → usage percentage&lt;/li&gt;
&lt;li&gt;Mounted on → where disk is attached&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 First command to run when server behaves weirdly.&lt;/p&gt;




&lt;h3&gt;
  
  
  2. Check Folder and Directory Size with &lt;code&gt;du&lt;/code&gt;
&lt;/h3&gt;



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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;-s&lt;/code&gt; → Summary (total size only)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-h&lt;/code&gt; → Human readable (KB, MB, GB)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 Used to find which folder is consuming space&lt;/p&gt;




&lt;h3&gt;
  
  
  3. Find Large Files in the System
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;find / &lt;span class="nt"&gt;-type&lt;/span&gt; f &lt;span class="nt"&gt;-size&lt;/span&gt; +100M 2&amp;gt;/dev/null
find / &lt;span class="nt"&gt;-type&lt;/span&gt; f &lt;span class="nt"&gt;-size&lt;/span&gt; +500M 2&amp;gt;/dev/null
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;⚠️ Can take time on large systems.&lt;/p&gt;

&lt;p&gt;👉 Common use:&lt;/p&gt;

&lt;p&gt;large logs&lt;br&gt;
backups&lt;br&gt;
unused media files&lt;/p&gt;


&lt;h3&gt;
  
  
  4. Find Biggest Directories (Very Important)
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;du&lt;/span&gt; &lt;span class="nt"&gt;-sh&lt;/span&gt; /&lt;span class="k"&gt;*&lt;/span&gt; 2&amp;gt;/dev/null | &lt;span class="nb"&gt;sort&lt;/span&gt; &lt;span class="nt"&gt;-hr&lt;/span&gt; | &lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; 10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;👉 Shows top 10 largest directories&lt;/p&gt;

&lt;p&gt;This is one of the most used DevOps troubleshooting commands.&lt;/p&gt;


&lt;h3&gt;
  
  
  5. Disk Full but Space Looks Free? (INODES)
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;df&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;p&gt;&lt;strong&gt;What are inodes?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Inodes store metadata about files.&lt;/p&gt;

&lt;p&gt;👉 Problem:&lt;/p&gt;

&lt;p&gt;Disk shows free space&lt;br&gt;
But system says:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;No space left on device
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 Cause:&lt;br&gt;
Too many small files.&lt;/p&gt;

&lt;p&gt;This is very common in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;log systems&lt;/li&gt;
&lt;li&gt;microservices&lt;/li&gt;
&lt;li&gt;temp file-heavy apps&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;
  
  
  6. Deleted Files Still Using Space
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;lsof | &lt;span class="nb"&gt;grep &lt;/span&gt;deleted
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;👉 Happens when:&lt;/p&gt;

&lt;p&gt;file is deleted&lt;br&gt;
but process is still using it&lt;/p&gt;

&lt;p&gt;So disk space is NOT freed.&lt;/p&gt;


&lt;h3&gt;
  
  
  Bonus Tool: &lt;code&gt;ncdu&lt;/code&gt; (Best for Beginners)
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;ncdu   &lt;span class="c"&gt;# Ubuntu/Debian&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;dnf &lt;span class="nb"&gt;install &lt;/span&gt;ncdu   &lt;span class="c"&gt;# Fedora/RHEL&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


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

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

&lt;/div&gt;



&lt;p&gt;Why it’s powerful:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;interactive UI&lt;/li&gt;
&lt;li&gt;easy navigation&lt;/li&gt;
&lt;li&gt;visual disk breakdown&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 Widely used by DevOps engineers for fast debugging&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Basic Cleanup Tips&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Remove old logs carefully&lt;/li&gt;
&lt;li&gt;delete unused backups&lt;/li&gt;
&lt;li&gt;Clear package cache when needed&lt;/li&gt;
&lt;li&gt;Always verify before using rm -rf&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ⚠️ Common Beginner mistakes
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Disk shows free space but system says full → Check inodes (&lt;code&gt;df -i&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;using rm -rf without checking size&lt;/li&gt;
&lt;li&gt;ignoring /var/log growth&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Simple Mental Model&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Think of disk like a room:&lt;/p&gt;

&lt;p&gt;/home → personal items&lt;br&gt;
/var → messy logs piling up&lt;br&gt;
/usr → installed apps&lt;br&gt;
/tmp → temporary trash&lt;/p&gt;

&lt;p&gt;👉 When room is full → system slows down&lt;/p&gt;




&lt;h3&gt;
  
  
  Summary
&lt;/h3&gt;

&lt;p&gt;In this guide you learned:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;df -h&lt;/code&gt; → Overall disk usage&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;du -sh&lt;/code&gt; → Folder size&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;find&lt;/code&gt; → Locate large files&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;df -i&lt;/code&gt; → Check inodes&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;lsof | grep deleted&lt;/code&gt; → Find deleted open files&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ncdu&lt;/code&gt; → Interactive disk usage analyzer&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Why This Matters&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Disk issues are one of the most common production failures in:&lt;/p&gt;

&lt;p&gt;DevOps systems&lt;br&gt;
cloud servers&lt;br&gt;
databases&lt;br&gt;
CI/CD pipelines&lt;/p&gt;

&lt;p&gt;👉 Knowing this = real-world Linux skill&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Next Post:&lt;/strong&gt;&lt;br&gt;
Linux Networking Basics for Beginners,(ping, curl, ip, ss, etc.)&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Question for You&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Have you ever faced a server where disk was full but you couldn’t find why?&lt;/p&gt;

&lt;p&gt;That’s usually inode or deleted file issues — I’ll show debugging tricks in Part 7.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>devops</category>
      <category>beginners</category>
      <category>sysadmin</category>
    </item>
    <item>
      <title>How Does Traffic Actually Reach Your Pods? Kubernetes Services &amp; kube-proxy Explained</title>
      <dc:creator>Sreekanth Kuruba</dc:creator>
      <pubDate>Tue, 16 Jun 2026 08:29:38 +0000</pubDate>
      <link>https://dev.to/sreekanth_kuruba_91721e5d/how-does-traffic-actually-reach-your-pods-kubernetes-services-kube-proxy-explained-ph9</link>
      <guid>https://dev.to/sreekanth_kuruba_91721e5d/how-does-traffic-actually-reach-your-pods-kubernetes-services-kube-proxy-explained-ph9</guid>
      <description>&lt;p&gt;Your backend Pod just crashed.&lt;/p&gt;

&lt;p&gt;Kubernetes created a new Pod with a completely different IP address.&lt;/p&gt;

&lt;p&gt;Yet your application didn't notice anything changed.&lt;/p&gt;

&lt;p&gt;How?&lt;/p&gt;

&lt;p&gt;Because applications don't talk directly to Pods.&lt;/p&gt;

&lt;p&gt;They talk to Kubernetes Services.&lt;/p&gt;

&lt;p&gt;A Service provides a stable virtual IP and DNS name, while kube-proxy quietly programs the networking rules that route traffic to the right Pods.&lt;/p&gt;

&lt;p&gt;In this post, we'll go beyond the usual "Service types" explanation and look at how traffic actually reaches your Pods under the hood.&lt;/p&gt;




&lt;h2&gt;
  
  
  What is a Kubernetes Service?
&lt;/h2&gt;

&lt;p&gt;A Service provides a &lt;strong&gt;stable virtual IP (ClusterIP)&lt;/strong&gt; and DNS name for a dynamic set of Pods.&lt;/p&gt;

&lt;p&gt;Think of it as a permanent front door for Pods that may come and go.&lt;/p&gt;

&lt;p&gt;Key points:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Services provide a stable endpoint for applications.&lt;/li&gt;
&lt;li&gt;Pods behind a Service can change without affecting clients.&lt;/li&gt;
&lt;li&gt;Services use labels and selectors to automatically discover matching Pods.&lt;/li&gt;
&lt;li&gt;The Service IP is virtual—there is no process directly listening on that IP.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A ClusterIP doesn't belong to a real network interface, and no process is directly listening on that IP.&lt;/p&gt;

&lt;p&gt;Instead, kube-proxy programs networking rules on every node so packets sent to the ClusterIP are transparently redirected to backend Pods.&lt;/p&gt;




&lt;h2&gt;
  
  
  How Does a Service Find Its Pods?
&lt;/h2&gt;

&lt;p&gt;Kubernetes uses labels and selectors to determine which Pods belong to a Service.&lt;/p&gt;

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

&lt;p&gt;Service selector:&lt;br&gt;
app=backend&lt;/p&gt;

&lt;p&gt;Matching Pods:&lt;br&gt;
app=backend&lt;/p&gt;

&lt;p&gt;Non-matching Pods:&lt;br&gt;
app=frontend&lt;/p&gt;

&lt;p&gt;Only the matching Pods become Service endpoints and receive traffic from the Service.&lt;/p&gt;


&lt;h2&gt;
  
  
  Why Do We Need Services?
&lt;/h2&gt;

&lt;p&gt;Imagine a Deployment with three Pods:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;backend-1 → 10.244.1.5
backend-2 → 10.244.2.8
backend-3 → 10.244.3.12
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If &lt;code&gt;backend-2&lt;/code&gt; crashes, Kubernetes creates:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;backend-4 → 10.244.2.15
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The old IP disappears.&lt;/p&gt;

&lt;p&gt;Without Services, every client would need to know the new Pod IPs constantly.&lt;/p&gt;

&lt;p&gt;Services solve this problem by giving applications a stable endpoint.&lt;/p&gt;




&lt;h2&gt;
  
  
  Types of Kubernetes Services
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. ClusterIP (Default)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Accessible only inside the cluster.&lt;/li&gt;
&lt;li&gt;Used for communication between microservices.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. NodePort
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Exposes the application on a port of every Kubernetes node.&lt;/li&gt;
&lt;li&gt;Useful for testing and simple external access.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. LoadBalancer
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Creates an external load balancer using your cloud provider.&lt;/li&gt;
&lt;li&gt;Commonly used for production applications.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. ExternalName
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Maps a Service to an external DNS name using a CNAME record.&lt;/li&gt;
&lt;li&gt;Useful for integrating external services.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  How Services Work Under the Hood
&lt;/h2&gt;

&lt;p&gt;When you create a Service:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Kubernetes allocates a &lt;strong&gt;ClusterIP&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Kubernetes creates &lt;strong&gt;EndpointSlices&lt;/strong&gt;, which contain the healthy Pod IPs behind the Service.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;kube-proxy&lt;/strong&gt; running on every node watches for Service and EndpointSlice changes.&lt;/li&gt;
&lt;li&gt;kube-proxy programs networking rules on the node.&lt;/li&gt;
&lt;li&gt;Traffic sent to the Service IP is automatically redirected to one of the backend Pods.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  kube-proxy: The Unsung Hero
&lt;/h2&gt;

&lt;p&gt;Many people think kube-proxy forwards packets itself.&lt;/p&gt;

&lt;p&gt;It doesn't.&lt;/p&gt;

&lt;p&gt;Its job is to configure the node's networking rules so Linux can route traffic efficiently.&lt;/p&gt;

&lt;p&gt;kube-proxy can run in three modes:&lt;/p&gt;

&lt;h3&gt;
  
  
  iptables Mode
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Most common deployment mode.&lt;/li&gt;
&lt;li&gt;Uses iptables rules for load balancing and NAT.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  IPVS Mode
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Uses Linux IP Virtual Server.&lt;/li&gt;
&lt;li&gt;Better scalability and performance for large clusters.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Userspace Mode
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Legacy mode.&lt;/li&gt;
&lt;li&gt;Rarely used today.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Traffic Flow Example
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Client Pod
      ↓
Service (ClusterIP)
      ↓
kube-proxy Rules
      ↓
┌─────┬─────┬─────┐
Pod A Pod B Pod C
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When a request is sent to a Service:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The packet reaches a node.&lt;/li&gt;
&lt;li&gt;kube-proxy's rules match the Service IP and port.&lt;/li&gt;
&lt;li&gt;Destination NAT (DNAT) redirects the request to one of the healthy Pods.&lt;/li&gt;
&lt;li&gt;The Pod sends the response back to the client.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;All of this happens transparently.&lt;/p&gt;

&lt;p&gt;The client thinks it is communicating with a single stable IP.&lt;/p&gt;




&lt;h2&gt;
  
  
  Common Service Problems
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Pods are not receiving traffic?
&lt;/h3&gt;

&lt;p&gt;Check whether labels match the Service selector.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl describe service &amp;lt;service-name&amp;gt;
kubectl get endpointslices
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  No backend Pods found?
&lt;/h3&gt;

&lt;p&gt;Verify the Pods are Ready.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get pods &lt;span class="nt"&gt;-o&lt;/span&gt; wide
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Debug kube-proxy Rules
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ipvsadm &lt;span class="nt"&gt;-Ln&lt;/span&gt;
iptables &lt;span class="nt"&gt;-t&lt;/span&gt; nat &lt;span class="nt"&gt;-L&lt;/span&gt; KUBE-SERVICES &lt;span class="nt"&gt;-n&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Fun Fact
&lt;/h2&gt;

&lt;p&gt;Some modern networking solutions like &lt;strong&gt;Cilium&lt;/strong&gt; can replace kube-proxy entirely using eBPF, reducing iptables complexity and improving observability.&lt;/p&gt;




&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;Pods are temporary, and their IP addresses can change at any time.&lt;/p&gt;

&lt;p&gt;Kubernetes Services provide a stable entry point, while kube-proxy makes the magic happen by programming networking rules on every node.&lt;/p&gt;

&lt;p&gt;Understanding this flow helps you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Debug Service connectivity issues faster&lt;/li&gt;
&lt;li&gt;Choose the right Service type&lt;/li&gt;
&lt;li&gt;Understand how traffic moves inside Kubernetes&lt;/li&gt;
&lt;li&gt;Build more reliable Kubernetes applications&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Next in the Series:&lt;/strong&gt; CoreDNS Explained – How Kubernetes Turns Service Names into IP Addresses&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>devops</category>
      <category>cloudnative</category>
      <category>networking</category>
    </item>
    <item>
      <title>Linux Process Management Explained Simply</title>
      <dc:creator>Sreekanth Kuruba</dc:creator>
      <pubDate>Tue, 09 Jun 2026 03:02:49 +0000</pubDate>
      <link>https://dev.to/sreekanth_kuruba_91721e5d/linux-process-management-explained-simply-45f5</link>
      <guid>https://dev.to/sreekanth_kuruba_91721e5d/linux-process-management-explained-simply-45f5</guid>
      <description>&lt;p&gt;Ever opened a Linux server and thought:&lt;/p&gt;

&lt;p&gt;“Why is everything so slow or frozen?”&lt;/p&gt;

&lt;p&gt;Most of the time, the problem is not Linux itself.&lt;/p&gt;

&lt;p&gt;It’s running processes consuming resources in the background.&lt;/p&gt;

&lt;p&gt;Let’s understand it simply.&lt;/p&gt;




&lt;h3&gt;
  
  
  What is a Process?
&lt;/h3&gt;

&lt;p&gt;A process is a running program or service on your Linux system.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Web browser&lt;/li&gt;
&lt;li&gt;Web server (Nginx/Apache)&lt;/li&gt;
&lt;li&gt;Database (MySQL, PostgreSQL)&lt;/li&gt;
&lt;li&gt;Background services&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  What is PID?
&lt;/h3&gt;

&lt;p&gt;Every process has a unique ID called a PID (Process ID).&lt;/p&gt;

&lt;p&gt;PID = identity number of a running program&lt;/p&gt;

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

&lt;p&gt;Chrome → PID 1234&lt;br&gt;
Nginx → PID 5678&lt;/p&gt;

&lt;p&gt;👉 You use PID to control processes (stop, monitor, debug).&lt;/p&gt;


&lt;h3&gt;
  
  
  1. Viewing Processes with &lt;code&gt;ps&lt;/code&gt;
&lt;/h3&gt;


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

&lt;/div&gt;


&lt;p&gt;Shows processes in current terminal only.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Better command:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ps aux
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Shows ALL processes with:&lt;/p&gt;

&lt;p&gt;CPU usage&lt;br&gt;
Memory usage&lt;br&gt;
User&lt;br&gt;
PID&lt;br&gt;
Command&lt;/p&gt;

&lt;p&gt;👉 This is a daily DevOps debugging command.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;Full system view:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ps &lt;span class="nt"&gt;-ef&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Shows process hierarchy (parent → child relationships)&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Command         Use

ps aux          Resource monitoring (CPU/MEM)
ps -ef          Process structure view
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  2. Real-Time Monitoring &lt;code&gt;top&lt;/code&gt;
&lt;/h3&gt;



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

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;top&lt;/code&gt; Shows live system activity:&lt;/p&gt;

&lt;p&gt;You can see:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CPU usage&lt;/li&gt;
&lt;li&gt;Memory usage&lt;/li&gt;
&lt;li&gt;Running processes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Useful keys inside &lt;code&gt;top&lt;/code&gt;:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;q&lt;/code&gt; → Quit&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;k&lt;/code&gt; → Kill a process&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;M&lt;/code&gt; → Sort by memory usage&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;P&lt;/code&gt; → Sort by CPU usage&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 Used when servers suddenly slow down or spike.&lt;/p&gt;




&lt;h3&gt;
  
  
  3. Better version: &lt;code&gt;htop&lt;/code&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install if not available:&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;htop     &lt;span class="c"&gt;# Ubuntu/Debian&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;dnf &lt;span class="nb"&gt;install &lt;/span&gt;htop     &lt;span class="c"&gt;# Fedora/RHEL&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why devs prefer htop:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Colorful UI&lt;/li&gt;
&lt;li&gt;Easier navigation&lt;/li&gt;
&lt;li&gt;Process tree view&lt;/li&gt;
&lt;li&gt;Simple killing of processes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 Much more user-friendly than top&lt;/p&gt;




&lt;h3&gt;
  
  
  4. Finding Specific Processes
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ps aux | &lt;span class="nb"&gt;grep &lt;/span&gt;nginx
ps aux | &lt;span class="nb"&gt;grep &lt;/span&gt;python
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Better alternatives:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pgrep nginx          &lt;span class="c"&gt;# Returns only PIDs&lt;/span&gt;
pidof nginx          &lt;span class="c"&gt;# Another way to get PID&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 Faster way to get PID directly&lt;/p&gt;




&lt;h3&gt;
  
  
  5. Killing Processes
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;kill &lt;/span&gt;1234            &lt;span class="c"&gt;# Graceful kill&lt;/span&gt;
&lt;span class="nb"&gt;kill&lt;/span&gt; &lt;span class="nt"&gt;-9&lt;/span&gt; 1234         &lt;span class="c"&gt;# Force kill (use only when necessary)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;-&amp;gt; You must know the PID of the process to use kill.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Safer &amp;amp; easier ways:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pkill nginx          &lt;span class="c"&gt;# Kill by process name&lt;/span&gt;
killall firefox      &lt;span class="c"&gt;# Kill all processes with that name&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;⚠️ Always double-check PID before killing a process.&lt;/p&gt;

&lt;p&gt;Wrong kill = system instability.&lt;/p&gt;




&lt;h3&gt;
  
  
  6. Background &amp;amp; Foreground Jobs
&lt;/h3&gt;

&lt;p&gt;Foreground Process:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Runs in terminal and blocks it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Background Process:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Runs without blocking terminal&lt;/li&gt;
&lt;/ul&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sleep &lt;/span&gt;100 &amp;amp;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&amp;amp; → sends process to background&lt;/li&gt;
&lt;li&gt;You can continue using terminal&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Useful commands:&lt;/p&gt;

&lt;p&gt;jobs → Show background jobs&lt;br&gt;
fg → Bring job to foreground&lt;br&gt;
bg → Resume paused job in background&lt;/p&gt;

&lt;p&gt;Useful when multitasking in terminal sessions.&lt;/p&gt;




&lt;h3&gt;
  
  
  7. Find Heavy Processes (CPU / Memory)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Sort by CPU (highest first)&lt;/span&gt;
ps aux &lt;span class="nt"&gt;--sort&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;-%cpu | &lt;span class="nb"&gt;head&lt;/span&gt;

&lt;span class="c"&gt;# Sort by Memory (highest first)&lt;/span&gt;
ps aux &lt;span class="nt"&gt;--sort&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;-%mem | &lt;span class="nb"&gt;head&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 Very useful in production debugging.&lt;/p&gt;




&lt;h3&gt;
  
  
  ⚠️ Important Safety Warning
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Never kill&lt;/strong&gt; critical system processes such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;systemd&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;init&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;kernel&lt;/code&gt; processes (usually shown with square brackets)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 Doing so can crash your system completely.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Simple Mental Model&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Think of Linux like a city:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Each app = a citizen&lt;/li&gt;
&lt;li&gt;PID = ID card&lt;/li&gt;
&lt;li&gt;CPU = energy usage&lt;/li&gt;
&lt;li&gt;RAM = working space&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Process management = controlling city traffic 🚦&lt;/p&gt;

&lt;h3&gt;
  
  
  Summary
&lt;/h3&gt;

&lt;p&gt;In this guide you learned:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What a process is&lt;/li&gt;
&lt;li&gt;What PID means&lt;/li&gt;
&lt;li&gt;How programs run in Linux&lt;/li&gt;
&lt;li&gt;Viewing processes (ps, top, htop)&lt;/li&gt;
&lt;li&gt;Finding processes (grep, pgrep, pidof)&lt;/li&gt;
&lt;li&gt;Killing processes safely (kill, pkill, killall)&lt;/li&gt;
&lt;li&gt;Foreground vs background processes&lt;/li&gt;
&lt;li&gt;Monitoring CPU and memory usage&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;why This Matters&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Process management is used in:&lt;/p&gt;

&lt;p&gt;DevOps debugging&lt;br&gt;
Server monitoring&lt;br&gt;
Performance optimization&lt;br&gt;
Cloud environments&lt;br&gt;
Production troubleshooting&lt;/p&gt;

&lt;p&gt;👉 This is a core real-world Linux skill.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Next Post:&lt;/strong&gt;&lt;br&gt;
Linux Disk Usage Explained Simply, (df, du, mounting basics)&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Question for You&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Have you ever faced a server slowdown because of a single process?&lt;/p&gt;

&lt;p&gt;I’ll show how to identify it instantly in Part 6.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>devops</category>
      <category>beginners</category>
      <category>sysadmin</category>
    </item>
    <item>
      <title>Linux User &amp; Group Management Explained Simply</title>
      <dc:creator>Sreekanth Kuruba</dc:creator>
      <pubDate>Thu, 28 May 2026 12:42:16 +0000</pubDate>
      <link>https://dev.to/sreekanth_kuruba_91721e5d/linux-user-group-management-explained-simply-2amb</link>
      <guid>https://dev.to/sreekanth_kuruba_91721e5d/linux-user-group-management-explained-simply-2amb</guid>
      <description>&lt;p&gt;Ever wondered how Linux knows:&lt;/p&gt;

&lt;p&gt;who can access what, and what they are allowed to do?&lt;/p&gt;

&lt;p&gt;That’s not random.&lt;/p&gt;

&lt;p&gt;It’s controlled by users and groups — one of the most important concepts in Linux security and DevOps.&lt;/p&gt;

&lt;p&gt;Let’s break it down simply.&lt;/p&gt;




&lt;h2&gt;
  
  
  What is a User in Linux?
&lt;/h2&gt;

&lt;p&gt;A user is an account that interacts with the Linux system.&lt;/p&gt;

&lt;p&gt;Every user has:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Username&lt;/li&gt;
&lt;li&gt;User ID (UID)&lt;/li&gt;
&lt;li&gt;Home directory&lt;/li&gt;
&lt;li&gt;Default shell&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Everything in Linux runs under a user identity.&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A developer user&lt;/li&gt;
&lt;li&gt;A system admin user&lt;/li&gt;
&lt;li&gt;A service user (like nginx)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  What is a Group in Linux?
&lt;/h2&gt;

&lt;p&gt;A group is a collection of users.&lt;/p&gt;

&lt;p&gt;Think of it like a team:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Developers group → devs&lt;/li&gt;
&lt;li&gt;QA group → testers&lt;/li&gt;
&lt;li&gt;Admins group → system administrators&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 Instead of assigning permissions one by one, you assign them to a group.&lt;/p&gt;

&lt;p&gt;This makes Linux scalable and manageable.&lt;/p&gt;




&lt;h2&gt;
  
  
  Check Current User &amp;amp; Groups
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;whoami&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Shows your current logged-in user.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;id&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Shows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;User ID (UID)&lt;/li&gt;
&lt;li&gt;Group ID (GID)&lt;/li&gt;
&lt;li&gt;All groups the user belongs to
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;groups&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Shows all groups of the current user.&lt;/p&gt;




&lt;h2&gt;
  
  
  Creating a User
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;useradd john
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Creates a new user named &lt;code&gt;john&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; This may not create a home directory in some systems.&lt;/p&gt;

&lt;p&gt;Better way (recommended on Ubuntu/Debian):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;adduser john
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 Automatically creates home directory + setup&lt;/p&gt;




&lt;h2&gt;
  
  
  Setting Password
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;passwd john
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Used to set or update user password.&lt;/p&gt;




&lt;h2&gt;
  
  
  Modifying Users (&lt;code&gt;usermod&lt;/code&gt;)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;usermod &lt;span class="nt"&gt;-aG&lt;/span&gt; developers john
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Adds user &lt;code&gt;john&lt;/code&gt; to &lt;code&gt;developers&lt;/code&gt; group.&lt;/p&gt;

&lt;p&gt;Other examples:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;usermod &lt;span class="nt"&gt;-l&lt;/span&gt; newname oldname   &lt;span class="c"&gt;# rename user&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;usermod &lt;span class="nt"&gt;-d&lt;/span&gt; /new/home john    &lt;span class="c"&gt;# change home directory&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Deleting Users
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;userdel john
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Removes user only.&lt;/p&gt;

&lt;p&gt;Remove user + home directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;userdel &lt;span class="nt"&gt;-r&lt;/span&gt; john
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;strong&gt;Managing Groups&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating a Group
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;groupadd developers
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Deleting a Group
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;groupdel developers
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Important System Files
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;/etc/passwd&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Stores user information:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;username:x:UID:GID:comment:home:shell
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;john:x:1001:1001::/home/john:/bin/bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 This file contains all users in the system.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;code&gt;/etc/group&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Stores group information:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;group_name:x:GID:user_list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;developers:x:1002:john,mike
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 Shows which users belong to which group.&lt;/p&gt;




&lt;h3&gt;
  
  
  What is sudo?
&lt;/h3&gt;

&lt;p&gt;sudo allows a user to run commands as an administrator (root).&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Why sudo is important
&lt;/h3&gt;

&lt;p&gt;Linux protects system files.&lt;/p&gt;

&lt;p&gt;Normal users cannot modify system-level settings.&lt;/p&gt;

&lt;p&gt;👉 sudo gives temporary admin power.&lt;/p&gt;




&lt;h3&gt;
  
  
  Important sudo concept
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Not every user has sudo access&lt;/li&gt;
&lt;li&gt;Only users in &lt;code&gt;sudo&lt;/code&gt; or &lt;code&gt;wheel&lt;/code&gt; group can use it&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Check your groups:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;groups&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Real-World Example
&lt;/h2&gt;

&lt;p&gt;In a company server:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Developers → normal users&lt;/li&gt;
&lt;li&gt;Admins → sudo users&lt;/li&gt;
&lt;li&gt;Services → system users (nginx, docker, etc.)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each user has restricted access based on role&lt;/p&gt;

&lt;p&gt;This keeps systems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;security &lt;/li&gt;
&lt;li&gt;structure &lt;/li&gt;
&lt;li&gt;control ⚙️&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Why User &amp;amp; Group Management Matters
&lt;/h2&gt;

&lt;p&gt;In DevOps and system administration:&lt;/p&gt;

&lt;p&gt;You use this to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;control server access&lt;/li&gt;
&lt;li&gt;manage teams on shared systems&lt;/li&gt;
&lt;li&gt;secure applications&lt;/li&gt;
&lt;li&gt;isolate services&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Without it:&lt;/p&gt;

&lt;p&gt;Linux systems become unmanageable and insecure&lt;/p&gt;




&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;In this guide you learned:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What users are in Linux&lt;/li&gt;
&lt;li&gt;What groups are&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;whoami&lt;/code&gt;, &lt;code&gt;id&lt;/code&gt;, &lt;code&gt;groups&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;useradd&lt;/code&gt;, &lt;code&gt;adduser&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;usermod&lt;/code&gt; usage&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;userdel&lt;/code&gt; and cleanup&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;groupadd&lt;/code&gt;, &lt;code&gt;groupdel&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/etc/passwd&lt;/code&gt; structure&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/etc/group&lt;/code&gt; structure&lt;/li&gt;
&lt;li&gt;sudo basics&lt;/li&gt;
&lt;li&gt;Real-world DevOps usage&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Next Post:
&lt;/h2&gt;

&lt;p&gt;Linux Process Management Explained Simply, (ps, top, htop, kill)&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Question for You&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Have you ever worked on a shared Linux server where multiple users caused confusion or permission issues?&lt;/p&gt;

&lt;p&gt;I’ll show how real systems solve that in Part 5.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>sysadmin</category>
      <category>beginners</category>
      <category>linux</category>
    </item>
    <item>
      <title>Linux File Permissions Explained Simply</title>
      <dc:creator>Sreekanth Kuruba</dc:creator>
      <pubDate>Tue, 26 May 2026 12:13:26 +0000</pubDate>
      <link>https://dev.to/sreekanth_kuruba_91721e5d/linux-file-permissions-explained-simply-1867</link>
      <guid>https://dev.to/sreekanth_kuruba_91721e5d/linux-file-permissions-explained-simply-1867</guid>
      <description>&lt;p&gt;Ever ran a Linux command and saw this?&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Permission denied&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;It feels random at first — but it’s not.&lt;/p&gt;

&lt;p&gt;That error is Linux protecting your system using file permissions.&lt;/p&gt;

&lt;p&gt;Once you understand this, Linux security suddenly starts making sense.&lt;/p&gt;




&lt;h3&gt;
  
  
  What Are Linux File Permissions?
&lt;/h3&gt;

&lt;p&gt;Every file and directory has &lt;strong&gt;three types of permissions&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Read (r) → View file content&lt;/li&gt;
&lt;li&gt;Write (w) → Modify or delete file&lt;/li&gt;
&lt;li&gt;Execute (x) → Run file as a program/script&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 These decide what you are allowed to do with a file.&lt;/p&gt;




&lt;h3&gt;
  
  
  3 Types of Users in Linux
&lt;/h3&gt;

&lt;p&gt;Permissions are not just for files — they are for users.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;User Type&lt;/th&gt;
&lt;th&gt;Symbol&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Owner&lt;/td&gt;
&lt;td&gt;u&lt;/td&gt;
&lt;td&gt;The owner of the file&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Group&lt;/td&gt;
&lt;td&gt;g&lt;/td&gt;
&lt;td&gt;Users in the same group&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Others&lt;/td&gt;
&lt;td&gt;o&lt;/td&gt;
&lt;td&gt;Everyone else&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;👉 Linux is a multi-user system, so access control is essential.&lt;/p&gt;




&lt;h3&gt;
  
  
  Understanding &lt;code&gt;ls -l&lt;/code&gt; (Very Important)
&lt;/h3&gt;

&lt;p&gt;Run this command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;-rwxr-xr-- 1 user group  1024 Apr 10 12:34 script.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Now it Breakdown:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;First character → &lt;code&gt;-&lt;/code&gt; = file, &lt;code&gt;d&lt;/code&gt; = directory&lt;/li&gt;
&lt;li&gt;Next 3 → Owner permissions&lt;/li&gt;
&lt;li&gt;Next 3 → Group permissions&lt;/li&gt;
&lt;li&gt;Last 3 → Others permissions&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Permission Symbols
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Symbol&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;r&lt;/td&gt;
&lt;td&gt;Read&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;w&lt;/td&gt;
&lt;td&gt;Write&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;x&lt;/td&gt;
&lt;td&gt;Execute&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;No permission&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h3&gt;
  
  
  Changing Permissions &lt;code&gt;chmod&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Make script executable&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chmod&lt;/span&gt; +x script.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Numeric method (very common in servers)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chmod &lt;/span&gt;755 script.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Numeric permissions are a shortcut to set all three permission types at once.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Common Numeric Permissions:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Number&lt;/th&gt;
&lt;th&gt;Permission&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;rwx&lt;/td&gt;
&lt;td&gt;Read + Write + Execute&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;rw-&lt;/td&gt;
&lt;td&gt;Read + Write&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;r-x&lt;/td&gt;
&lt;td&gt;Read + Execute&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;r--&lt;/td&gt;
&lt;td&gt;Read only&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;👉 So:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;755 = rwx r-x r-x
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Owner → full access&lt;br&gt;
Group → read + execute&lt;br&gt;
Others → read + execute&lt;/p&gt;


&lt;h4&gt;
  
  
  Change Owner (&lt;code&gt;chown&lt;/code&gt;)
&lt;/h4&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chown &lt;/span&gt;username file.txt
&lt;span class="nb"&gt;chown &lt;/span&gt;user:group file.txt  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chown&lt;/span&gt; &lt;span class="nt"&gt;-R&lt;/span&gt; user:group folder/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Only the root user or sudo user can change ownership.&lt;/p&gt;

&lt;h4&gt;
  
  
  Changing Group (&lt;code&gt;chgrp&lt;/code&gt;)
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chgrp &lt;/span&gt;developers project/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Used when:&lt;/p&gt;

&lt;p&gt;multiple developers work on same project&lt;br&gt;
shared access is needed&lt;/p&gt;


&lt;h3&gt;
  
  
  ⚠️ Dangerous Mistake Beginners Make
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chmod &lt;/span&gt;777 file.txt     &lt;span class="c"&gt;# ❌ Very Dangerous&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;🚨 This gives:&lt;/p&gt;

&lt;p&gt;full access to everyone&lt;br&gt;
no security control&lt;br&gt;
breaks Linux permission model&lt;/p&gt;

&lt;p&gt;👉 Never use this in real servers.&lt;/p&gt;


&lt;h3&gt;
  
  
  Real-Life Example
&lt;/h3&gt;

&lt;p&gt;You create a script:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./script.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And get:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Permission denied
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chmod&lt;/span&gt; +x script.sh
./script.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 This is one of the most common Linux beginner issues.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Simple Mental Model&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Think of Linux permissions like a building:&lt;/p&gt;

&lt;p&gt;Owner → has master key&lt;br&gt;
Group → shared access card&lt;br&gt;
Others → guest access&lt;/p&gt;

&lt;p&gt;And:&lt;/p&gt;

&lt;p&gt;r → can look inside&lt;br&gt;
w → can modify&lt;br&gt;
x → can enter/run&lt;/p&gt;

&lt;h3&gt;
  
  
  Summary
&lt;/h3&gt;

&lt;p&gt;You learned:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What r, w, x mean&lt;/li&gt;
&lt;li&gt;User types (owner, group, others)&lt;/li&gt;
&lt;li&gt;How to read ls -l&lt;/li&gt;
&lt;li&gt;Using chmod&lt;/li&gt;
&lt;li&gt;Numeric permissions (755, 644, etc.)&lt;/li&gt;
&lt;li&gt;Changing ownership with chown&lt;/li&gt;
&lt;li&gt;Changing groups with chgrp&lt;/li&gt;
&lt;li&gt;Why chmod 777 is dangerous&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Why This Matters&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;File permissions are not just theory.&lt;/p&gt;

&lt;p&gt;They are used in:&lt;/p&gt;

&lt;p&gt;Linux servers&lt;br&gt;
DevOps pipelines&lt;br&gt;
Docker containers&lt;br&gt;
Cloud systems&lt;br&gt;
Production deployments&lt;/p&gt;

&lt;p&gt;👉 If you understand this, you understand Linux security basics.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Next Post:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Linux User &amp;amp; Group Management Explained Simply,useradd, usermod, groups&lt;/p&gt;




&lt;p&gt;Which permission concept confused you the most when you first used Linux?&lt;/p&gt;

&lt;p&gt;I’ll simplify it even further in Part 4.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>beginners</category>
      <category>sysadmin</category>
      <category>linux</category>
    </item>
    <item>
      <title>Linux File System Explained Simply</title>
      <dc:creator>Sreekanth Kuruba</dc:creator>
      <pubDate>Thu, 21 May 2026 09:53:57 +0000</pubDate>
      <link>https://dev.to/sreekanth_kuruba_91721e5d/linux-file-system-explained-simply-178h</link>
      <guid>https://dev.to/sreekanth_kuruba_91721e5d/linux-file-system-explained-simply-178h</guid>
      <description>&lt;p&gt;Most beginners don’t struggle with Linux commands.&lt;/p&gt;

&lt;p&gt;They struggle with one invisible problem:&lt;/p&gt;

&lt;p&gt;They don’t understand how the Linux file system actually works.&lt;/p&gt;

&lt;p&gt;Once this clicks, Linux stops feeling random — and starts feeling predictable.&lt;/p&gt;

&lt;p&gt;Let’s fix that.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;The Core Idea of Linux File System&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Unlike Windows (C:, D: drives), Linux uses one single tree structure.&lt;/p&gt;

&lt;p&gt;Everything starts from:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 This is called the root directory&lt;/p&gt;

&lt;p&gt;Think of it as the “starting point of everything” in Linux.&lt;/p&gt;

&lt;p&gt;All files, folders, devices, and even processes branch out from here.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Important Linux Mindset Shift&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In Linux:&lt;/p&gt;

&lt;p&gt;Everything is a file.&lt;/p&gt;

&lt;p&gt;That includes:&lt;/p&gt;

&lt;p&gt;Files 📄&lt;br&gt;
Folders 📁&lt;br&gt;
Hard disks 💽&lt;br&gt;
USB devices 🔌&lt;br&gt;
Processes ⚙️&lt;/p&gt;

&lt;p&gt;This is why Linux feels different — but powerful.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;Visualizing Linux Structure&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Think of &lt;code&gt;/&lt;/code&gt; like the trunk of a tree.&lt;/p&gt;

&lt;p&gt;Everything grows from it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/
├── home
├── etc
├── var
├── usr
├── bin
└── dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once you understand this tree, navigation becomes easy.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Paths in Linux (Very Important&lt;/strong&gt;)&lt;/p&gt;

&lt;p&gt;A path tells Linux where something is located.&lt;/p&gt;

&lt;p&gt;🔹 Absolute Path&lt;/p&gt;

&lt;p&gt;Starts from &lt;code&gt;/&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; /home/user/documents
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;✔ Always full location&lt;br&gt;
✔ Works from anywhere&lt;/p&gt;

&lt;p&gt;🔹 Relative Path&lt;/p&gt;

&lt;p&gt;Starts from where you are currently:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;documents
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;✔ Shorter&lt;br&gt;
✔ Depends on current location&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;Navigation Symbols&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.   → current directory  
..  → parent directory  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ..
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 Go one step back&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;/home — Your Personal Space&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/home/user
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each user gets a personal folder:&lt;/p&gt;

&lt;p&gt;Documents&lt;br&gt;
Downloads&lt;br&gt;
Projects&lt;br&gt;
Config files&lt;/p&gt;

&lt;p&gt;👉 Think of it as your “workspace”&lt;/p&gt;




&lt;h3&gt;
  
  
  Important Linux Directories
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Directory&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;th&gt;Common Usage&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Root directory (starting point)&lt;/td&gt;
&lt;td&gt;Everything is inside this&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/home&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;User personal files&lt;/td&gt;
&lt;td&gt;Documents, Downloads, Desktop&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/etc&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Configuration files&lt;/td&gt;
&lt;td&gt;System &amp;amp; application settings&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/var&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Variable data (logs, caches, queues)&lt;/td&gt;
&lt;td&gt;Logs, web server data&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/tmp&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Temporary files&lt;/td&gt;
&lt;td&gt;Deleted on reboot&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/bin&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Essential binary commands&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;ls&lt;/code&gt;, &lt;code&gt;cp&lt;/code&gt;, &lt;code&gt;mv&lt;/code&gt;, &lt;code&gt;cat&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/usr&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;User installed programs &amp;amp; libraries&lt;/td&gt;
&lt;td&gt;Most installed software&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/root&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Home directory of root (admin) user&lt;/td&gt;
&lt;td&gt;Administrator files&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/boot&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Boot loader and kernel files&lt;/td&gt;
&lt;td&gt;Files needed to start the system&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/dev&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Device files&lt;/td&gt;
&lt;td&gt;Hard disks, USB, terminals&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/proc&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Process and system information&lt;/td&gt;
&lt;td&gt;Live system data (virtual)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/sys&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Kernel &amp;amp; hardware information&lt;/td&gt;
&lt;td&gt;System hardware details&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/opt&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Optional software&lt;/td&gt;
&lt;td&gt;Third-party applications&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;/mnt&lt;/code&gt; / &lt;code&gt;/media&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Mount points for external drives&lt;/td&gt;
&lt;td&gt;USB drives, additional disks&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;p&gt;&lt;strong&gt;Detailed Explanation of Most Used Directories&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1./home — Your workspace&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Where your projects, downloads, and personal files live.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;2./etc — System control center&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Contains almost all configuration files.&lt;br&gt;
This is one of the most critical directories in Linux systems.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;/etc/passwd&lt;/code&gt; — user accounts&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/etc/ssh/sshd_config&lt;/code&gt; — SSH settings&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/etc/nginx/&lt;/code&gt; — web server config&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 If Linux had a “settings app”, this is it.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;3./var — Changing data (VERY important)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Used for data that keeps changing:&lt;br&gt;
Most production issues can be traced by checking logs in &lt;code&gt;/var/log&lt;/code&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;/var/log/&lt;/code&gt; — system and application logs&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/var/www/&lt;/code&gt; — Default web files (for Apache/Nginx)&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;4./tmp — Temporary space&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Used for temporary files.&lt;br&gt;
Usually cleared on reboot&lt;/p&gt;

&lt;p&gt;⚠️ Never store important data here.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;5./usr — Installed software&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Main location for installed user programs and libraries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;/usr/bin/&lt;/code&gt; — most user commands&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most system commands come from here.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;6./boot — Startup system&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Contains kernel and boot files.&lt;/p&gt;

&lt;p&gt;⚠️ If broken → system may not boot.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;7./dev — Hardware as files&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Represents hardware devices as files.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;/dev/sda&lt;/code&gt; → hard disk&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/dev/tty&lt;/code&gt; → terminals&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Everything in Linux is treated as a file, including hardware.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;8./proc — Live system data&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Virtual filesystem showing:&lt;/p&gt;

&lt;p&gt;processes&lt;br&gt;
memory&lt;br&gt;
CPU info&lt;/p&gt;

&lt;p&gt;👉 It’s not stored on disk — it’s generated live.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;9./root — Admin home&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Not the same as /&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;/ → whole system&lt;/li&gt;
&lt;li&gt;/root → admin user’s home&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;10./mnt &amp;amp; /media — External drives&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Used when you plug:&lt;/p&gt;

&lt;p&gt;USB&lt;br&gt;
external HDD&lt;br&gt;
extra disks&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;What is Mounting? (Important Concept)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In Linux, storage devices don’t automatically appear like in Windows.&lt;/p&gt;

&lt;p&gt;Instead, they are “attached” to a folder.&lt;/p&gt;

&lt;p&gt;This process is called mounting.&lt;/p&gt;

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

&lt;p&gt;USB drive → mounted to /media&lt;br&gt;
Extra disk → mounted to /mnt&lt;br&gt;
System disk → mounted to /&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Useful Commands to Explore the Filesystem&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;pwd&lt;/code&gt; → Show current location&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ls/&lt;/code&gt; → List root directories&lt;/li&gt;
&lt;li&gt;cd /var/log&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;tree&lt;/code&gt; → Visual directory structure&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Simple Mental Model&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Think of Linux filesystem like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;/&lt;/code&gt; = The whole computer&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/home&lt;/code&gt; = My personal room&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/etc&lt;/code&gt; = Settings room&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/var&lt;/code&gt; = Logs &amp;amp; changing data&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/tmp&lt;/code&gt; = Temporary workspace&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/usr&lt;/code&gt; = Installed applications&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/boot&lt;/code&gt; = Engine to start the system&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 Once this clicks, Linux becomes predictable.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;⚠️ Common Beginner Mistakes&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Storing important files in &lt;code&gt;/tmp&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Editing files in &lt;code&gt;/etc&lt;/code&gt; without backup&lt;/li&gt;
&lt;li&gt;Deleting unknown system folders&lt;/li&gt;
&lt;li&gt;Running this blindly:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Running &lt;span class="sb"&gt;`&lt;/span&gt;&lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; /&lt;span class="sb"&gt;`&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;⚠️ Never do this.&lt;/p&gt;




&lt;h3&gt;
  
  
  Summary
&lt;/h3&gt;

&lt;p&gt;You learned:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Linux starts from /&lt;/li&gt;
&lt;li&gt;Everything is a file&lt;/li&gt;
&lt;li&gt;Absolute vs relative paths&lt;/li&gt;
&lt;li&gt;Navigation symbols . and ..&lt;/li&gt;
&lt;li&gt;Important system directories:&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/home&lt;/code&gt; → User files&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/etc&lt;/code&gt; → Configuration files&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/var&lt;/code&gt; → Logs and variable data&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/tmp&lt;/code&gt; → Temporary files&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/usr&lt;/code&gt; → Installed software&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/boot&lt;/code&gt; → Boot files&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/dev&lt;/code&gt; → Hardware devices&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why This Matters&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you understand the Linux file system:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Commands become easier&lt;/li&gt;
&lt;li&gt;Debugging becomes faster&lt;/li&gt;
&lt;li&gt;Servers stop feeling confusing&lt;/li&gt;
&lt;li&gt;DevOps becomes logical instead of random&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Next Post:&lt;/strong&gt;&lt;br&gt;
Linux File Permissions Explained Simply (chmod, chown, chgrp)&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Question for You&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Which Linux directory confused you the most when you started?&lt;/p&gt;

&lt;p&gt;I’ll simplify it in Part 3.&lt;/p&gt;




</description>
      <category>devops</category>
      <category>beginners</category>
      <category>sysadmin</category>
      <category>linux</category>
    </item>
    <item>
      <title>10 Essential Linux Commands Every Beginner Must Know</title>
      <dc:creator>Sreekanth Kuruba</dc:creator>
      <pubDate>Tue, 19 May 2026 03:24:57 +0000</pubDate>
      <link>https://dev.to/sreekanth_kuruba_91721e5d/10-essential-linux-commands-every-beginner-must-know-32b0</link>
      <guid>https://dev.to/sreekanth_kuruba_91721e5d/10-essential-linux-commands-every-beginner-must-know-32b0</guid>
      <description>&lt;p&gt;Most beginners don’t struggle with Linux because it’s hard.&lt;/p&gt;

&lt;p&gt;They struggle because they try to learn everything at once.&lt;/p&gt;

&lt;p&gt;The truth is simple:&lt;/p&gt;

&lt;p&gt;You only need a small set of commands to start working confidently in Linux, DevOps, and cloud environments.&lt;/p&gt;

&lt;p&gt;In this post, you’ll learn 10 essential Linux commands that are used every day on real servers.&lt;/p&gt;

&lt;p&gt;If you understand these, Linux will finally start to “click”.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;What You’ll Learn in 5 Minutes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;By the end of this post, you will know how to:&lt;/p&gt;

&lt;p&gt;Navigate files and folders&lt;br&gt;
Create, copy, move, and delete files&lt;br&gt;
View file contents&lt;br&gt;
Understand basic system interaction&lt;/p&gt;

&lt;p&gt;These are the exact commands used in real DevOps workflows.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;Before We Start (Important Mindset Shift)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Think of Linux like your smartphone.&lt;/p&gt;

&lt;p&gt;Android/iOS → Linux OS&lt;br&gt;
Apps → Programs&lt;br&gt;
Settings → System configuration&lt;br&gt;
Storage → Linux folders&lt;br&gt;
Permissions popup → File permissions&lt;br&gt;
Restart phone → System reboot&lt;/p&gt;

&lt;p&gt;You don’t “see” the system — you just use it.&lt;/p&gt;

&lt;p&gt;That’s exactly how Linux works.&lt;/p&gt;


&lt;h3&gt;
  
  
  1. &lt;code&gt;ls&lt;/code&gt; — List Files and Directories
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;ls
ls&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt;     &lt;span class="c"&gt;# Detailed list (permissions, size, date)&lt;/span&gt;
&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-a&lt;/span&gt;     &lt;span class="c"&gt;# Show hidden files&lt;/span&gt;
&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-la&lt;/span&gt;    &lt;span class="c"&gt;# Most commonly used combination&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Real-world usage:&lt;br&gt;
Used daily to check files, permissions, and directory contents.&lt;/p&gt;


&lt;h3&gt;
  
  
  2. &lt;code&gt;cd&lt;/code&gt; — Change Directory
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; /home/user/documents
&lt;span class="nb"&gt;cd&lt;/span&gt; ..     &lt;span class="c"&gt;# Go back one directory&lt;/span&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt; ~      &lt;span class="c"&gt;# Go to home directory&lt;/span&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt; -      &lt;span class="c"&gt;# Go to previous directory&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Real-world usage:&lt;br&gt;
Used to navigate between directories in servers and systems.&lt;/p&gt;


&lt;h3&gt;
  
  
  3. &lt;code&gt;pwd&lt;/code&gt; — Print Working Directory
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;pwd&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Shows your current location in the filesystem.&lt;/p&gt;

&lt;p&gt;Real-world usage:&lt;br&gt;
Used to verify current working path.&lt;/p&gt;


&lt;h3&gt;
  
  
  4. &lt;code&gt;mkdir&lt;/code&gt; — Make Directory
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;myfolder
&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; dir1/dir2/dir3   &lt;span class="c"&gt;# Create nested directories&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Real-world usage:&lt;br&gt;
Used to create project folders or directory structures.&lt;/p&gt;


&lt;h3&gt;
  
  
  5. &lt;code&gt;rm&lt;/code&gt; — Remove Files or Directories
&lt;/h3&gt;

&lt;p&gt;⚠️ Dangerous command — can delete everything permanently if misused.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;rm &lt;/span&gt;file.txt
&lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; foldername          &lt;span class="c"&gt;# Remove directory&lt;/span&gt;
&lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; foldername         &lt;span class="c"&gt;# Force remove (very dangerous)&lt;/span&gt;
&lt;span class="nb"&gt;rmdir &lt;/span&gt;foldername          &lt;span class="c"&gt;# To remove only an empty directory&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Safer alternative with confirmation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-ri&lt;/span&gt; foldername
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;-i asks before deleting each file.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Tip:&lt;/strong&gt; Always use &lt;code&gt;ls&lt;/code&gt; first before deleting anything.&lt;br&gt;
&lt;strong&gt;Tip:&lt;/strong&gt; In Linux, there is no recycle bin in most servers. Deleted files are usually gone permanently.&lt;/p&gt;

&lt;p&gt;Real-world usage:&lt;br&gt;
Used to delete unwanted files or clean up space.&lt;/p&gt;


&lt;h3&gt;
  
  
  6. &lt;code&gt;cp&lt;/code&gt; — Copy Files and Directories
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cp &lt;/span&gt;file.txt file_backup.txt
&lt;span class="nb"&gt;cp&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; folder1 folder2     &lt;span class="c"&gt;# Copy folder&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Real-world usage:&lt;br&gt;
Used for backups before modifying files.&lt;/p&gt;


&lt;h3&gt;
  
  
  7. &lt;code&gt;mv&lt;/code&gt; — Move or Rename Files
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mv &lt;/span&gt;file.txt /home/user/docs/
&lt;span class="nb"&gt;mv &lt;/span&gt;oldname.txt newname.txt   &lt;span class="c"&gt;# Rename file&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Real-world usage:&lt;br&gt;
Used to move logs, configs, or rename files.&lt;/p&gt;


&lt;h3&gt;
  
  
  8. &lt;code&gt;cat&lt;/code&gt; — View File Content
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;filename.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Real-world usage:&lt;br&gt;
Used to quickly view file contents like logs and configuration files.&lt;/p&gt;


&lt;h3&gt;
  
  
  9. &lt;code&gt;touch&lt;/code&gt; — Create Empty File
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;touch &lt;/span&gt;newfile.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Real-world usage:&lt;br&gt;
Used to create log or config files.&lt;/p&gt;


&lt;h3&gt;
  
  
  10. &lt;code&gt;echo&lt;/code&gt; — Print Text / Write to File
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Hello World"&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Hello Linux"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; file.txt     &lt;span class="c"&gt;# Create/overwrite file&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"New line"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; file.txt       &lt;span class="c"&gt;# Append to file&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Real-world usage:&lt;br&gt;
Used to write data into files or test outputs.&lt;/p&gt;


&lt;h2&gt;
  
  
  Beginner Basics (Highly Recommended)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is a Terminal?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The terminal is a text-based interface used to interact with the Linux operating system using commands.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;Basic Command Structure&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Most Linux commands follow this format:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;command&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;options] &lt;span class="o"&gt;[&lt;/span&gt;arguments]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Example
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-la&lt;/span&gt; /home/user
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;ls&lt;/code&gt; → command&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-la&lt;/code&gt; → options&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/home/user&lt;/code&gt; → argument&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Linux is Case-Sensitive&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Linux treats uppercase and lowercase differently.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;file.txt
FILE.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These are considered two different files.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Paths in Linux&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Absolute Path&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Starts from the root directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; /home/user/documents
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Relative Path&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Starts from your current location.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;documents
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;strong&gt;Useful Beginner Commands&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;man &lt;span class="nb"&gt;ls&lt;/span&gt;       &lt;span class="c"&gt;# Show manual for any command&lt;/span&gt;
&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;--help&lt;/span&gt;   &lt;span class="c"&gt;# Quick help&lt;/span&gt;
&lt;span class="nb"&gt;whoami&lt;/span&gt;       &lt;span class="c"&gt;# Show current logged-in user&lt;/span&gt;
&lt;span class="nb"&gt;id&lt;/span&gt;           &lt;span class="c"&gt;# Shows user and group IDs&lt;/span&gt;
&lt;span class="nb"&gt;uname&lt;/span&gt; &lt;span class="nt"&gt;-a&lt;/span&gt;    &lt;span class="c"&gt;# Display system information&lt;/span&gt;
&lt;span class="nb"&gt;history&lt;/span&gt;      &lt;span class="c"&gt;# Show previously used commands&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;strong&gt;Keyboard Shortcuts Every Beginner Should Know&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Ctrl + C     &lt;span class="c"&gt;# Stop a running command&lt;/span&gt;
Ctrl + Z     &lt;span class="c"&gt;# Pause/suspend a running process&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;strong&gt;Bonus: &lt;code&gt;sudo&lt;/code&gt; — Run Commands as Administrator&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update
&lt;span class="nb"&gt;sudo mkdir&lt;/span&gt; /newfolder
&lt;span class="nb"&gt;sudo chown &lt;/span&gt;user:group file.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;sudo&lt;/code&gt; stands for “SuperUser DO” and runs commands with admin (root) privileges.&lt;/li&gt;
&lt;li&gt;Gives you temporary admin rights&lt;/li&gt;
&lt;li&gt;You will use it very often for installing packages and editing system files&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Warning:&lt;/strong&gt; Use &lt;code&gt;sudo&lt;/code&gt; only when necessary.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Why These Commands Matter&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;These commands form the foundation of working with Linux.&lt;/p&gt;

&lt;p&gt;Almost every advanced Linux task — DevOps, cloud computing, scripting, server management — builds on these basics.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You learned:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Navigation → &lt;code&gt;ls&lt;/code&gt;, &lt;code&gt;cd&lt;/code&gt;, &lt;code&gt;pwd&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;File Management → &lt;code&gt;mkdir&lt;/code&gt;, &lt;code&gt;cp&lt;/code&gt;, &lt;code&gt;mv&lt;/code&gt;, &lt;code&gt;rm&lt;/code&gt;, &lt;code&gt;touch&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;File Content → &lt;code&gt;cat&lt;/code&gt;, &lt;code&gt;echo&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Administrator access → &lt;code&gt;sudo&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;System &amp;amp; User Info -&amp;gt; &lt;code&gt;whoami&lt;/code&gt;, &lt;code&gt;id&lt;/code&gt;, &lt;code&gt;uname -a&lt;/code&gt;, &lt;code&gt;history&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Next Steps:&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;After mastering these basics, next learn:&lt;br&gt;
Linux File System Explained Simply,(/, /home, /etc, /var, etc.)&lt;/p&gt;

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