<?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>Finding Files &amp; Text in Linux Explained Simply (find, grep, which &amp; whereis)</title>
      <dc:creator>Sreekanth Kuruba</dc:creator>
      <pubDate>Tue, 14 Jul 2026 03:03:02 +0000</pubDate>
      <link>https://dev.to/sreekanth_kuruba_91721e5d/finding-files-text-in-linux-explained-simply-find-grep-which-whereis-4lll</link>
      <guid>https://dev.to/sreekanth_kuruba_91721e5d/finding-files-text-in-linux-explained-simply-find-grep-which-whereis-4lll</guid>
      <description>&lt;p&gt;One of the most common questions Linux beginners ask is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“Where is this file?”&lt;/li&gt;
&lt;li&gt;“How do I find a specific error in logs?”&lt;/li&gt;
&lt;li&gt;“Where is this command installed?”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Linux has powerful tools to answer these questions quickly.&lt;/p&gt;

&lt;p&gt;In this guide, you’ll learn the most useful search commands.&lt;/p&gt;




&lt;h3&gt;
  
  
  Finding Files vs Searching Text
&lt;/h3&gt;

&lt;p&gt;These are two different tasks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Finding files&lt;/strong&gt; = Locating a file or directory on the system → &lt;code&gt;find&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Searching text&lt;/strong&gt; = Looking for words inside files → &lt;code&gt;grep&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  1. Find Files with &lt;code&gt;find&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;# Find a specific file&lt;/span&gt;
find /home &lt;span class="nt"&gt;-name&lt;/span&gt; &lt;span class="s2"&gt;"nginx.conf"&lt;/span&gt;

&lt;span class="c"&gt;# Search entire system (ignore permission errors)&lt;/span&gt;
find / &lt;span class="nt"&gt;-name&lt;/span&gt; &lt;span class="s2"&gt;"*.log"&lt;/span&gt; 2&amp;gt;/dev/null

&lt;span class="c"&gt;# Find only directories&lt;/span&gt;
find &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="nt"&gt;-type&lt;/span&gt; d

&lt;span class="c"&gt;# Find only files&lt;/span&gt;
find &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="nt"&gt;-type&lt;/span&gt; f

&lt;span class="c"&gt;# Find files larger than 100MB&lt;/span&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
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Useful for:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Finding configuration files&lt;/li&gt;
&lt;li&gt;Locating log files&lt;/li&gt;
&lt;li&gt;Finding large files&lt;/li&gt;
&lt;li&gt;Searching project directories&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Best Tip:&lt;/strong&gt; Always try to narrow the search path instead of searching from &lt;code&gt;/&lt;/code&gt; whenever possible.&lt;/p&gt;




&lt;h3&gt;
  
  
  2. Search Text Inside Files with &lt;code&gt;grep&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;# Search for a word&lt;/span&gt;
&lt;span class="nb"&gt;grep &lt;/span&gt;error app.log

&lt;span class="c"&gt;# Case insensitive search&lt;/span&gt;
&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt; error app.log

&lt;span class="c"&gt;# Search recursively in directory&lt;/span&gt;
&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; &lt;span class="s2"&gt;"database"&lt;/span&gt; /etc/

&lt;span class="c"&gt;# Show line numbers&lt;/span&gt;
&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; &lt;span class="s2"&gt;"listen"&lt;/span&gt; nginx.conf

&lt;span class="c"&gt;# Count matches&lt;/span&gt;
&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="s2"&gt;"failed"&lt;/span&gt; auth.log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Useful for:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Searching logs&lt;/li&gt;
&lt;li&gt;Finding configuration values&lt;/li&gt;
&lt;li&gt;Looking for error messages&lt;/li&gt;
&lt;li&gt;Debugging applications&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  3. Find Executable Location with &lt;code&gt;which&lt;/code&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;which python3
which docker
which nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Shows the full path of the command that will be executed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Useful for:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Finding executable locations&lt;br&gt;
Checking which version of a command Linux will run&lt;br&gt;
Verifying software installation&lt;/p&gt;


&lt;h3&gt;
  
  
  4. Find Program Files with &lt;code&gt;whereis&lt;/code&gt;
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;whereis nginx
whereis python3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;It can show:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Binary location&lt;br&gt;
Source files (if available)&lt;br&gt;
Manual pages&lt;/p&gt;

&lt;p&gt;Useful when you want to know where a program and its documentation are stored.&lt;/p&gt;


&lt;h3&gt;
  
  
  Bonus: Fast File Search with &lt;code&gt;locate&lt;/code&gt;
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;locate nginx.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Much faster than &lt;code&gt;find&lt;/code&gt; because it uses a database.&lt;/p&gt;

&lt;p&gt;If it doesn't return recent files, Update database:&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;updatedb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note: locate may not be installed by default on every Linux distribution.&lt;/p&gt;




&lt;h3&gt;
  
  
  Real-World Troubleshooting Example
&lt;/h3&gt;

&lt;p&gt;Nginx is not starting.&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="c"&gt;# Find config file&lt;/span&gt;
find /etc &lt;span class="nt"&gt;-name&lt;/span&gt; nginx.conf 2&amp;gt;/dev/null

&lt;span class="c"&gt;# Search for errors in logs&lt;/span&gt;
&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt; error /var/log/nginx/error.log

&lt;span class="c"&gt;# Check executable&lt;/span&gt;
which nginx

&lt;span class="c"&gt;# See all related files&lt;/span&gt;
whereis nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is a common workflow during Linux troubleshooting.&lt;/p&gt;




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

&lt;ul&gt;
&lt;li&gt;Using &lt;code&gt;find /&lt;/code&gt; instead of a specific directory&lt;/li&gt;
&lt;li&gt;Forgetting &lt;code&gt;2&amp;gt;/dev/null&lt;/code&gt; when searching the whole system&lt;/li&gt;
&lt;li&gt;Confusing &lt;code&gt;find&lt;/code&gt; with &lt;code&gt;grep&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Not knowing the difference between &lt;code&gt;which&lt;/code&gt; and &lt;code&gt;whereis&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Forgetting that &lt;code&gt;locate&lt;/code&gt; may require an updated database&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Simple Mental Model
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;Use For&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;find&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Locate files and directories&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;grep&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Search text inside files&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;which&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Find executable path&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;whereis&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Find program + docs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;locate&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Fast filename search&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&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;How to find files with &lt;code&gt;find&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;How to search text with &lt;code&gt;grep&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;How to locate commands with &lt;code&gt;which&lt;/code&gt; and &lt;code&gt;whereis&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;How to perform fast filename searches with &lt;code&gt;locate&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Next Post:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Viewing Files in Linux (cat, less, head, tail &amp;amp; wc)&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Question for You&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Which command do you use most while troubleshooting — &lt;code&gt;find&lt;/code&gt;, &lt;code&gt;grep&lt;/code&gt;, or something else?&lt;/p&gt;




</description>
      <category>linux</category>
      <category>devops</category>
      <category>beginners</category>
      <category>sysadmin</category>
    </item>
    <item>
      <title>Linux Package Management Explained Simply (apt, dnf, yum &amp; rpm)</title>
      <dc:creator>Sreekanth Kuruba</dc:creator>
      <pubDate>Tue, 07 Jul 2026 03:13:00 +0000</pubDate>
      <link>https://dev.to/sreekanth_kuruba_91721e5d/linux-package-management-explained-simply-apt-dnf-yum-rpm-11gn</link>
      <guid>https://dev.to/sreekanth_kuruba_91721e5d/linux-package-management-explained-simply-apt-dnf-yum-rpm-11gn</guid>
      <description>&lt;p&gt;&lt;strong&gt;Quick Note&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In my previous article, I mentioned that &lt;strong&gt;Linux Troubleshooting Flow for Beginners&lt;/strong&gt; would be the final post in this series.&lt;/p&gt;

&lt;p&gt;While preparing it, I realized there were a few practical Linux skills every beginner should learn first. These topics will make the troubleshooting guide much easier to understand and follow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Before we wrap up the series, we'll cover:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Package Management&lt;br&gt;
Finding Files &amp;amp; Text&lt;br&gt;
Viewing Files Efficiently&lt;br&gt;
File Compression&lt;/p&gt;

&lt;p&gt;Then we'll bring everything together in the final &lt;strong&gt;Linux Troubleshooting Flow for Beginners.&lt;/strong&gt;&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Installing software on Linux is very different from Windows.&lt;/p&gt;

&lt;p&gt;On Windows, you usually download an &lt;code&gt;.exe&lt;/code&gt; installer.&lt;br&gt;&lt;br&gt;
On Linux, software is typically installed and managed using &lt;code&gt;package managers&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This is one of the most practical skills every Linux beginner should learn early.&lt;/p&gt;


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

&lt;p&gt;A &lt;strong&gt;package&lt;/strong&gt; is a ready-to-install bundle that contains:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The main program&lt;/li&gt;
&lt;li&gt;Required libraries&lt;/li&gt;
&lt;li&gt;Configuration files&lt;/li&gt;
&lt;li&gt;Documentation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt; &lt;code&gt;nginx&lt;/code&gt;, &lt;code&gt;git&lt;/code&gt;, &lt;code&gt;docker&lt;/code&gt;, &lt;code&gt;curl&lt;/code&gt;, &lt;code&gt;vim&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Think of a package as a ready-to-install software box.&lt;/p&gt;


&lt;h3&gt;
  
  
  What is a Package Manager?
&lt;/h3&gt;

&lt;p&gt;A package manager is a tool that installs, updates, removes, and manages software packages.&lt;br&gt;
Instead of downloading software manually, you simply run a command.&lt;/p&gt;

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

&lt;p&gt;&lt;code&gt;sudo apt install git&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The package manager automatically:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Downloads packages from trusted repositories&lt;/li&gt;
&lt;li&gt;Install required dependencies automatically&lt;/li&gt;
&lt;li&gt;Upgrade installed software&lt;/li&gt;
&lt;li&gt;Removes them cleanly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of manual downloading, you just run one command.&lt;/p&gt;


&lt;h3&gt;
  
  
  Why Use a Package Manager?
&lt;/h3&gt;

&lt;p&gt;Without package managers, you would have to:&lt;/p&gt;

&lt;p&gt;Search for software manually&lt;br&gt;
Download files from websites&lt;br&gt;
Install dependencies yourself&lt;br&gt;
Update each application separately&lt;/p&gt;

&lt;p&gt;Package managers automate all of this.&lt;/p&gt;


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

&lt;p&gt;Package managers download software from repositories.&lt;/p&gt;

&lt;p&gt;A repository is a trusted online collection of software packages maintained by your Linux distribution.&lt;/p&gt;

&lt;p&gt;Instead of downloading software from random websites, Linux installs it securely from these repositories.&lt;/p&gt;


&lt;h3&gt;
  
  
  Common Package Managers
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Distribution&lt;/th&gt;
&lt;th&gt;Package Manager&lt;/th&gt;
&lt;th&gt;Low-level Tool&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Ubuntu / Debian&lt;/td&gt;
&lt;td&gt;&lt;code&gt;apt&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;dpkg&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fedora / RHEL / Rocky&lt;/td&gt;
&lt;td&gt;&lt;code&gt;dnf&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;rpm&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Older RHEL / CentOS&lt;/td&gt;
&lt;td&gt;&lt;code&gt;yum&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;rpm&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Most Ubuntu users will use apt, while Fedora and modern RHEL-based systems use dnf.&lt;/p&gt;


&lt;h3&gt;
  
  
  Most Useful Commands
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Update Package List&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Before installing software, update the package list.&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="c"&gt;# Ubuntu/Debian&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;dnf check-update    &lt;span class="c"&gt;# Fedora/RHEL&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note: apt update does not upgrade installed packages.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;2. Upgrade Installed Packages&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 upgrade   &lt;span class="c"&gt;#Ubuntu/Debian&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;dnf upgrade   &lt;span class="c"&gt;#Fedora/RHEL&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Installs the latest available versions of your installed packages.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;3. Install a Package&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;nginx   &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;nginx   &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;Example packages:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;sudo apt install git&lt;br&gt;
sudo apt install curl&lt;br&gt;
sudo apt install vim&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;4. Remove a Package&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 remove nginx    &lt;span class="c"&gt;#Ubuntu/Debian&lt;/span&gt;
&lt;span class="c"&gt;# Remove package and configuration files&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt purge nginx     
&lt;span class="nb"&gt;sudo &lt;/span&gt;dnf remove nginx    &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;5. Search for Packages&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;apt search docker    &lt;span class="c"&gt;#Ubuntu/Debian&lt;/span&gt;
dnf search docker    &lt;span class="c"&gt;#Fedora/RHEL&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Useful when you're unsure of the exact package name.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;6. View Package Information&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;apt show nginx    &lt;span class="c"&gt;#Ubuntu/Debian&lt;/span&gt;
dnf info nginx    &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;Shows details such as:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Version&lt;br&gt;
Description&lt;br&gt;
Dependencies&lt;br&gt;
Package size&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;7. List Installed Packages&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;apt list &lt;span class="nt"&gt;--installed&lt;/span&gt;   &lt;span class="c"&gt;#Ubuntu/Debian&lt;/span&gt;
dnf list installed     &lt;span class="c"&gt;#Fedora/RHEL&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Useful for verifying whether software is already installed.&lt;/p&gt;




&lt;h3&gt;
  
  
  Low-Level Tool: rpm
&lt;/h3&gt;

&lt;p&gt;The rpm command works directly with RPM package files.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;rpm &lt;span class="nt"&gt;-q&lt;/span&gt; nginx          &lt;span class="c"&gt;# Check if installed&lt;/span&gt;
rpm &lt;span class="nt"&gt;-qi&lt;/span&gt; nginx         &lt;span class="c"&gt;# Detailed info&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Usually you don't need to use rpm directly. On RPM-based systems, dnf handles package installation and dependencies for you.&lt;/p&gt;




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

&lt;ul&gt;
&lt;li&gt;Running &lt;code&gt;apt upgrade&lt;/code&gt; without &lt;code&gt;apt update&lt;/code&gt; first&lt;/li&gt;
&lt;li&gt;Confusing apt update with apt upgrade&lt;/li&gt;
&lt;li&gt;Installing software from random websites instead of official repositories&lt;/li&gt;
&lt;li&gt;Forgetting to use &lt;code&gt;sudo&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Removing important system packages&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Simple Mental Model
&lt;/h3&gt;

&lt;p&gt;Think of a package manager like an &lt;strong&gt;App Store&lt;/strong&gt; for Linux:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Package = App&lt;/li&gt;
&lt;li&gt;Repository = App Store&lt;/li&gt;
&lt;li&gt;Package Manager = Installer + Updater&lt;/li&gt;
&lt;/ul&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 packages and package managers are&lt;/li&gt;
&lt;li&gt;Basic package management commands using apt and dnf&lt;/li&gt;
&lt;li&gt;Basic package management commands&lt;/li&gt;
&lt;li&gt;Common mistakes to avoid&lt;/li&gt;
&lt;/ul&gt;




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

&lt;p&gt;Package management is a daily task for:&lt;/p&gt;

&lt;p&gt;Linux administrators&lt;br&gt;
DevOps engineers&lt;br&gt;
Cloud engineers&lt;br&gt;
Developers&lt;/p&gt;

&lt;p&gt;If you know how to manage packages, setting up and maintaining Linux systems becomes much easier.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Next Post:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Finding Files &amp;amp; Text in Linux Explained Simply (find, grep, which &amp;amp; whereis)&lt;/p&gt;




</description>
      <category>devops</category>
      <category>linux</category>
      <category>beginners</category>
      <category>sysadmin</category>
    </item>
    <item>
      <title>Linux Logs Explained Simply</title>
      <dc:creator>Sreekanth Kuruba</dc:creator>
      <pubDate>Tue, 30 Jun 2026 03:22:27 +0000</pubDate>
      <link>https://dev.to/sreekanth_kuruba_91721e5d/linux-logs-explained-simply-3pjn</link>
      <guid>https://dev.to/sreekanth_kuruba_91721e5d/linux-logs-explained-simply-3pjn</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;post: 7&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When something breaks in Linux, experienced engineers don’t guess.&lt;/p&gt;

&lt;p&gt;They check the logs.&lt;/p&gt;

&lt;p&gt;👉 Logs are the “black box recorder” of a Linux system.&lt;/p&gt;

&lt;p&gt;They tell you:&lt;/p&gt;

&lt;p&gt;what happened&lt;br&gt;
when it happened&lt;br&gt;
why it failed&lt;/p&gt;

&lt;p&gt;If you can read logs properly, you can debug almost anything.&lt;/p&gt;


&lt;h3&gt;
  
  
  What Are Logs?
&lt;/h3&gt;

&lt;p&gt;Logs are records of system and application activity.&lt;/p&gt;

&lt;p&gt;Linux constantly records:&lt;/p&gt;

&lt;p&gt;System events&lt;br&gt;
Errors&lt;br&gt;
User activity&lt;br&gt;
Application behavior&lt;/p&gt;

&lt;p&gt;Linux constantly records:&lt;/p&gt;


&lt;h3&gt;
  
  
  Where are Logs Stored?
&lt;/h3&gt;

&lt;p&gt;Most Linux logs are stored inside:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Check logs 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; /var/log
&lt;span class="nb"&gt;ls&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the first place DevOps engineers check during system issues.&lt;/p&gt;




&lt;h3&gt;
  
  
  Important Log Files
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Log File&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;th&gt;Command to View&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/var/log/syslog&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;General system messages&lt;/td&gt;
&lt;td&gt;&lt;code&gt;tail /var/log/syslog&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/var/log/auth.log&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Login attempts &amp;amp; authentication&lt;/td&gt;
&lt;td&gt;&lt;code&gt;tail /var/log/auth.log&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/var/log/kern.log&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Kernel &amp;amp; hardware messages&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;dmesg&lt;/code&gt; or &lt;code&gt;tail /var/log/kern.log&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/var/log/nginx/error.log&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Web server errors (Nginx)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;tail /var/log/nginx/error.log&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/var/log/dmesg&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Boot and hardware logs&lt;/td&gt;
&lt;td&gt;&lt;code&gt;dmesg&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;/var/log/apache2/ -&amp;gt; Apache logs&lt;/p&gt;

&lt;p&gt;These logs help you identify system, security, and application-level issues.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;View Logs&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Using&lt;/strong&gt; &lt;code&gt;cat&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;cat&lt;/span&gt; /var/log/syslog
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Good for small files.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Using&lt;/strong&gt; &lt;code&gt;less&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;less /var/log/syslog
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Space&lt;/code&gt; → Next page&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;b&lt;/code&gt; → Previous page&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;q&lt;/code&gt;→ Quit&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 Best for large log files.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Using&lt;/strong&gt; &lt;code&gt;tail&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;tail&lt;/span&gt; /var/log/syslog
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Show last 10 lines.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Real-Time Monitoring (tail -f)&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;tail&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; /var/log/syslog
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 -f = follow live updates&lt;/p&gt;

&lt;p&gt;This is one of the most-used debugging commands in production servers.&lt;/p&gt;

&lt;p&gt;Stop with:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;






&lt;p&gt;&lt;strong&gt;Searching Logs with grep&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;grep &lt;/span&gt;error /var/log/syslog
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Case-insensitive:&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;grep&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt; failed /var/log/auth.log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Show latest matching errors:&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;grep &lt;/span&gt;error /var/log/syslog | &lt;span class="nb"&gt;tail&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; 50
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 Essential for filtering huge logs quickly.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Boot &amp;amp; Hardware Logs (dmesg)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;dmesg&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Boot messages&lt;/li&gt;
&lt;li&gt;Hardware detection&lt;/li&gt;
&lt;li&gt;Kernel events&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Useful for startup and hardware troubleshooting.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Modern Log System:&lt;/strong&gt; &lt;code&gt;journalctl&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Modern Linux systems use &lt;strong&gt;systemd logs&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;journalctl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Recent errors:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Specific service logs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;journalctl &lt;span class="nt"&gt;-u&lt;/span&gt; nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Live monitoring:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Last 1 hour:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;journalctl &lt;span class="nt"&gt;--since&lt;/span&gt; &lt;span class="s2"&gt;"1 hour ago"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 journalctl is the modern replacement for many traditional log files.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;What is Log Rotation?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Logs grow continuously.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;disks fill up&lt;/li&gt;
&lt;li&gt;systems slow down&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Linux automatically rotates logs using:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;👉 Old logs are compressed or removed automatically.&lt;/p&gt;




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

&lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt; Website is not working.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;systemctl status nginx
&lt;span class="nb"&gt;tail&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; /var/log/nginx/error.log
journalctl &lt;span class="nt"&gt;-u&lt;/span&gt; nginx &lt;span class="nt"&gt;-xe&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 In real systems, logs usually reveal the exact root cause.&lt;/p&gt;




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

&lt;ul&gt;
&lt;li&gt;guessing instead of checking logs&lt;/li&gt;
&lt;li&gt;using cat on huge files&lt;/li&gt;
&lt;li&gt;deleting logs blindly&lt;/li&gt;
&lt;li&gt;ignoring tail -f&lt;/li&gt;
&lt;li&gt;assuming service is healthy because it says “active”&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 logs like CCTV recordings:&lt;/p&gt;

&lt;p&gt;system logs → building activity&lt;br&gt;
auth logs → door access records&lt;br&gt;
kernel logs → hardware monitoring&lt;br&gt;
app logs → employee activity&lt;/p&gt;

&lt;p&gt;👉 Debugging Linux = investigating evidence&lt;/p&gt;




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

&lt;p&gt;what logs are&lt;br&gt;
where logs are stored (&lt;code&gt;/var/log&lt;/code&gt;)&lt;br&gt;
important log files&lt;br&gt;
&lt;code&gt;cat&lt;/code&gt;, &lt;code&gt;less&lt;/code&gt;, &lt;code&gt;tail&lt;/code&gt;&lt;br&gt;
live monitoring with &lt;code&gt;tail -f&lt;/code&gt;&lt;br&gt;
searching logs with &lt;code&gt;grep&lt;/code&gt;&lt;br&gt;
boot logs using &lt;code&gt;dmesg&lt;/code&gt;&lt;br&gt;
modern logging with &lt;code&gt;journalctl&lt;/code&gt;&lt;br&gt;
log rotation basics&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Why Logs Matter&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Logs are the foundation of:&lt;/p&gt;

&lt;p&gt;Linux troubleshooting&lt;br&gt;
DevOps debugging&lt;br&gt;
production incident response&lt;br&gt;
server monitoring&lt;br&gt;
security analysis&lt;/p&gt;

&lt;p&gt;👉 The better you read logs, the faster you solve problems.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;End of Linux Beginner Series&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;Linux basics&lt;br&gt;
filesystem structure&lt;br&gt;
permissions&lt;br&gt;
users &amp;amp; groups&lt;br&gt;
processes&lt;br&gt;
disk usage&lt;br&gt;
networking&lt;br&gt;
logs &amp;amp; troubleshooting&lt;/p&gt;

&lt;p&gt;That’s already more Linux knowledge than most beginners have.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Final Next Step:&lt;/strong&gt;&lt;br&gt;
Linux Troubleshooting Flow for Beginners&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Final Question&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Which topic in this Linux series helped you the most?&lt;/p&gt;

&lt;p&gt;And what Linux topic should the next series cover?&lt;/p&gt;

</description>
      <category>linux</category>
      <category>devops</category>
      <category>beginners</category>
      <category>sysadmin</category>
    </item>
    <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;Before kube-proxy can forward traffic to a Service, Kubernetes first needs to translate the Service name into its ClusterIP. That's exactly what &lt;strong&gt;CoreDNS&lt;/strong&gt; does.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;backend-service&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;mysql-service&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;redis-service&lt;/code&gt;&lt;/li&gt;
&lt;/ul&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;p&gt;&lt;strong&gt;Why Do We Need DNS in Kubernetes?&lt;/strong&gt;&lt;/p&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;p&gt;&lt;strong&gt;What Is CoreDNS?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;CoreDNS is the DNS server for Kubernetes clusters.&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;p&gt;&lt;strong&gt;Where Does CoreDNS Run?&lt;/strong&gt;&lt;/p&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;p&gt;&lt;strong&gt;How Service Discovery Works&lt;/strong&gt;&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Service Name:&lt;/strong&gt; &lt;code&gt;backend-service&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Namespace:&lt;/strong&gt; &lt;code&gt;default&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ClusterIP:&lt;/strong&gt; &lt;code&gt;10.96.15.21&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A Pod sends a request to:&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;p&gt;&lt;strong&gt;Kubernetes DNS Naming&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;DNS Name&lt;/th&gt;
&lt;th&gt;Used When&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;backend-service&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Same namespace&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;backend-service.default&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Specify the namespace&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;backend-service.default.svc&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Include the Service domain&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;backend-service.default.svc.cluster.local&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Fully Qualified Domain Name (FQDN)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Most applications simply use &lt;code&gt;backend-service&lt;/code&gt; because Kubernetes automatically appends the remaining DNS suffix.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Why Does &lt;code&gt;backend-service&lt;/code&gt; Work Without Typing the Full DNS Name?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every Pod receives a DNS configuration file:&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;cat&lt;/span&gt; /etc/resolv.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It contains the &lt;strong&gt;CoreDNS nameserver&lt;/strong&gt; and &lt;strong&gt;search domains&lt;/strong&gt;, allowing short Service names like &lt;code&gt;backend-service&lt;/code&gt; to resolve automatically without typing the full FQDN.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;DNS Lookup Flow&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;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;p&gt;&lt;strong&gt;ClusterIP Service&lt;/strong&gt;&lt;/p&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;p&gt;&lt;strong&gt;Headless Service&lt;/strong&gt;&lt;/p&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 the 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;p&gt;&lt;strong&gt;1. Service name not resolving?&lt;/strong&gt;&lt;/p&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;p&gt;&lt;strong&gt;2. Test DNS from a Pod&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;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;p&gt;&lt;strong&gt;3. Check CoreDNS Pods&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;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;&lt;strong&gt;4. View CoreDNS Logs&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;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;p&gt;&lt;strong&gt;Why CoreDNS Matters&lt;/strong&gt;&lt;/p&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;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;/p&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;br&gt;
&lt;strong&gt;Ingress Explained – How External Traffic Enters Your Kubernetes Cluster.&lt;/strong&gt;&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;blockquote&gt;
&lt;p&gt;&lt;em&gt;Post: 6&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&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;blockquote&gt;
&lt;p&gt;&lt;em&gt;post: 5&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&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;blockquote&gt;
&lt;p&gt;&lt;em&gt;post: 4&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&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;blockquote&gt;
&lt;p&gt;&lt;em&gt;post: 3&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&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>
  </channel>
</rss>
