<?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: Chielo Chiamaka </title>
    <description>The latest articles on DEV Community by Chielo Chiamaka  (@chielo_chiamaka).</description>
    <link>https://dev.to/chielo_chiamaka</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F359837%2Fbe4de325-3bb1-4331-92e4-8c7976b00e3d.jpg</url>
      <title>DEV Community: Chielo Chiamaka </title>
      <link>https://dev.to/chielo_chiamaka</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/chielo_chiamaka"/>
    <language>en</language>
    <item>
      <title>Another way to manage your Linux server, without the terminal</title>
      <dc:creator>Chielo Chiamaka </dc:creator>
      <pubDate>Tue, 20 May 2025 15:44:21 +0000</pubDate>
      <link>https://dev.to/chielo_chiamaka/another-way-to-manage-your-linux-server-without-the-terminal-1ja3</link>
      <guid>https://dev.to/chielo_chiamaka/another-way-to-manage-your-linux-server-without-the-terminal-1ja3</guid>
      <description>&lt;p&gt;If the terminal ever felt overwhelming or your system froze during a long session (like mine just did), let me introduce you to &lt;strong&gt;Cockpit&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It’s a browser-based dashboard for Linux.&lt;/p&gt;

&lt;p&gt;With it, you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Monitor CPU, RAM, disk usage&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Start/stop services&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Manage users and updates&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Even access the terminal (if you still want to)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Just open your browser and go to &lt;code&gt;https://your-server-ip:9090&lt;/code&gt;. Login with your Linux username, and you're in!&lt;/p&gt;

&lt;p&gt;Works well on &lt;strong&gt;RHEL, Fedora, Ubuntu, etc.&lt;/strong&gt; And it’s perfect for home labs or remote server admins.&lt;/p&gt;

&lt;p&gt;Sometimes, the best fix is a backup way to manage things. That’s what Cockpit gave me.&lt;/p&gt;

&lt;p&gt;Have you used it before?&lt;/p&gt;

&lt;p&gt;📌Stay tuned for a guide on how to launch Cockpit from the terminal.&lt;/p&gt;

</description>
      <category>cloudwhistler</category>
      <category>linux</category>
      <category>cockpit</category>
      <category>devops</category>
    </item>
    <item>
      <title>Implementing and Managing Security Protocols in Linux</title>
      <dc:creator>Chielo Chiamaka </dc:creator>
      <pubDate>Fri, 16 May 2025 12:15:45 +0000</pubDate>
      <link>https://dev.to/chielo_chiamaka/implementing-and-managing-security-protocols-in-linux-3h04</link>
      <guid>https://dev.to/chielo_chiamaka/implementing-and-managing-security-protocols-in-linux-3h04</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;Introduction&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;If you're managing a  Linux system, one of the most important responsibilities you'll take on is securing your environment. &lt;/p&gt;

&lt;p&gt;You can’t afford to leave your system open to threats,  and that’s where understanding security protocols comes in.&lt;/p&gt;

&lt;p&gt;This guide covers &lt;strong&gt;essential security measures&lt;/strong&gt; every Linux system administrator should enforce to safeguard a Linux environment effectively.  &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Table of Contents&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
1. Securing SSH Access
&lt;/li&gt;
&lt;li&gt;
2. Managing Firewalls with Firewalld
&lt;/li&gt;
&lt;li&gt;
3. Enforcing Policies with SELinux
&lt;/li&gt;
&lt;li&gt;
4. Controlling Access with Users, Groups, and Permissions
&lt;/li&gt;
&lt;li&gt;
5. Keeping the System Updated
&lt;/li&gt;
&lt;li&gt;
6. Monitoring and Auditing Activity
&lt;/li&gt;
&lt;li&gt;
Conclusion
&lt;/li&gt;
&lt;li&gt;Let's Connect on LinkedIn&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  1. Securing SSH Access
&lt;/h2&gt;

&lt;p&gt;SSH is the main entry point for remote system administration, making it a high-priority target for attackers.  &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Why It Matters&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Hackers scan for open SSH ports &lt;strong&gt;constantly&lt;/strong&gt;, looking for weak configurations to break in. If SSH security is compromised, an attacker could &lt;strong&gt;take full control&lt;/strong&gt; of the system.  &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Best Practices&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Disable Root Login&lt;/strong&gt; (Prevent direct root access)  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Edit configuration:
&lt;/li&gt;
&lt;/ul&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;ul&gt;
&lt;li&gt;Change:
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PermitRootLogin no
&lt;/code&gt;&lt;/pre&gt;



&lt;ul&gt;
&lt;li&gt;Restart SSH:
&lt;/li&gt;
&lt;/ul&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;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why?&lt;/strong&gt; If an attacker gains access as root, they can install malware, delete files, or shut down the server. Hackers often &lt;strong&gt;target root because it’s a default username&lt;/strong&gt;, making it easier for brute-force attacks.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Use Key-Based Authentication Instead of Passwords&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Generate SSH keys:
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh-keygen
&lt;/code&gt;&lt;/pre&gt;



&lt;ul&gt;
&lt;li&gt;Copy the key to the remote server:
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh-copy-id user@server
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why?&lt;/strong&gt; Keys eliminate password-based authentication, making it impossible for attackers to brute-force their way in.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Consider Changing the Default SSH Port&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Modify SSH config:
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Port 2222
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;While &lt;strong&gt;not a replacement for strong authentication&lt;/strong&gt;, changing the port &lt;strong&gt;reduces automated scans&lt;/strong&gt; targeting default SSH ports.  &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;2. Managing Firewalls with Firewalld&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Firewalld controls network access, defining which services can communicate with the system.  &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Why It Matters&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Without a firewall, &lt;strong&gt;any service running on the system is exposed to the internet&lt;/strong&gt; including ones that shouldn’t be accessible externally. Firewalld &lt;strong&gt;blocks unauthorized traffic&lt;/strong&gt; while allowing trusted services like &lt;strong&gt;SSH&lt;/strong&gt; and &lt;strong&gt;HTTPS&lt;/strong&gt;.  &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Basic Firewall Commands&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Check Firewall Status:&lt;/strong&gt;
&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;sudo &lt;/span&gt;firewall-cmd &lt;span class="nt"&gt;--state&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Confirms whether Firewalld is active.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;List Allowed Services:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;


&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;sudo &lt;/span&gt;firewall-cmd &lt;span class="nt"&gt;--list-all&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Shows currently permitted services and firewall rules.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Add a Trusted Service (e.g., SSH):&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;


&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;sudo &lt;/span&gt;firewall-cmd &lt;span class="nt"&gt;--permanent&lt;/span&gt; &lt;span class="nt"&gt;--add-service&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;ssh
  &lt;span class="nb"&gt;sudo &lt;/span&gt;firewall-cmd &lt;span class="nt"&gt;--reload&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;--permanent&lt;/code&gt; flag ensures rules persist after a reboot.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--reload&lt;/code&gt; applies changes immediately.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Zones in Firewalld&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Zones define &lt;strong&gt;trust levels&lt;/strong&gt; for network traffic:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Public&lt;/strong&gt; – Least trusted (minimal access).
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Internal&lt;/strong&gt; – More trusted (used in private networks).
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trusted, External, Home, Work, Block&lt;/strong&gt; – Various levels of restriction.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Setting the &lt;strong&gt;appropriate zone for each network interface&lt;/strong&gt; ensures that services are &lt;strong&gt;only accessible where needed&lt;/strong&gt;.  &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;3. Enforcing Policies with SELinux&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;SELinux provides &lt;strong&gt;mandatory access control&lt;/strong&gt;, preventing unauthorized programs from accessing system files—even if exploited.  &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Why It Matters&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;A &lt;strong&gt;compromised application&lt;/strong&gt; could attempt to access system resources. SELinux ensures that even if an attacker gains access, &lt;strong&gt;they are restricted&lt;/strong&gt; from making further changes outside predefined security rules.  &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Basic SELinux Commands&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Check SELinux Status:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Shows if SELinux is &lt;strong&gt;Enforcing, Permissive, or Disabled&lt;/strong&gt;.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Enable Enforcing Mode Temporarily:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;


&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;sudo &lt;/span&gt;setenforce 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Immediately activates SELinux restrictions.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Make It Permanent (Survives Reboots):&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;


&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;sudo &lt;/span&gt;nano /etc/selinux/config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Change:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELINUX=enforcing
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Save and reboot.  &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Troubleshooting SELinux&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Use sealert (GUI tool for SELinux alerts)&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check logs for blocked actions:&lt;/strong&gt;
&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;cat&lt;/span&gt; /var/log/audit/audit.log | &lt;span class="nb"&gt;grep &lt;/span&gt;AVC
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;This helps diagnose issues related to SELinux restrictions.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;4. Controlling Access with Users, Groups, and Permissions&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Proper user management ensures &lt;strong&gt;files and directories are only accessible by authorized users&lt;/strong&gt;.  &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Key Tools for Access Control&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Change permissions (&lt;code&gt;chmod&lt;/code&gt;)&lt;/strong&gt;
&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;chmod &lt;/span&gt;600 secret.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Restricts access to the file’s owner.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Change ownership (&lt;code&gt;chown&lt;/code&gt;)&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;


&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;chown &lt;/span&gt;user:group file
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Assigns a new owner and group.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Grant limited admin access (&lt;code&gt;sudo&lt;/code&gt;)&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;


&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;sudo &lt;/span&gt;usermod &lt;span class="nt"&gt;-aG&lt;/span&gt; wheel username
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Adds the user to the administrator group for &lt;strong&gt;controlled privilege escalation&lt;/strong&gt;.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;5. Keeping the System Updated&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Unpatched systems are &lt;strong&gt;prime targets&lt;/strong&gt; for attackers exploiting known vulnerabilities.  &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Keeping Software Up to Date&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Manually update the system:&lt;/strong&gt;
&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;sudo &lt;/span&gt;dnf update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Enable automatic updates:&lt;/strong&gt;
&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;sudo &lt;/span&gt;dnf &lt;span class="nb"&gt;install &lt;/span&gt;dnf-automatic
  &lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl &lt;span class="nb"&gt;enable&lt;/span&gt; &lt;span class="nt"&gt;--now&lt;/span&gt; dnf-automatic.timer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;This ensures regular background updates, &lt;strong&gt;reducing security risks&lt;/strong&gt;.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;6. Monitoring and Auditing Activity&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Tracking &lt;strong&gt;who did what&lt;/strong&gt; on the system ensures accountability and security.  &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Key Log Files&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Authentication logs:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;System-wide logs:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&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;ul&gt;
&lt;li&gt;
&lt;strong&gt;Security audit logs:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  auditd &lt;span class="o"&gt;(&lt;/span&gt;audit service&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Using auditd to Monitor Activity&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Enable auditd:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&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 &lt;span class="nb"&gt;enable&lt;/span&gt; &lt;span class="nt"&gt;--now&lt;/span&gt; auditd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Check audit logs for specific user actions:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&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;ausearch &lt;span class="nt"&gt;-ua&lt;/span&gt; yourusername
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Helps track security-related activities.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Implementing these security protocols ensures &lt;strong&gt;a stronger, more resilient Linux system&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;Stay consistent with these and regularly review your systems to maintain a strong security posture. &lt;/p&gt;

&lt;p&gt;This knowledge will serve you well whether you’re managing a single server or a complex network.&lt;/p&gt;

&lt;p&gt;&lt;a id="Let's Connect on LinkedIn"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Let’s connect on LinkedIn
&lt;/h2&gt;

&lt;p&gt;(&lt;a href="https://www.linkedin.com/in/chiamaka-chielo?utm_source=share&amp;amp;utm_campaign=share_via&amp;amp;utm_content=profile&amp;amp;utm_medium=android_app" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/chiamaka-chielo?utm_source=share&amp;amp;utm_campaign=share_via&amp;amp;utm_content=profile&amp;amp;utm_medium=android_app&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;As I automate my journey into RHCE and Ansible, I’d love to connect with fellow learners and professionals. Feel free to reach out and join me as I share tips, resources, and insights throughout this 30-day challenge.&lt;/p&gt;

&lt;h1&gt;
  
  
  cloudwhistler #30daysLinuxchallenge
&lt;/h1&gt;

</description>
      <category>cloudwhistler</category>
      <category>linux</category>
      <category>devops</category>
    </item>
    <item>
      <title>find command</title>
      <dc:creator>Chielo Chiamaka </dc:creator>
      <pubDate>Wed, 14 May 2025 11:25:58 +0000</pubDate>
      <link>https://dev.to/chielo_chiamaka/find-command-51gg</link>
      <guid>https://dev.to/chielo_chiamaka/find-command-51gg</guid>
      <description>&lt;h1&gt;
  
  
  Introduction to the &lt;code&gt;find&lt;/code&gt; Command in Linux
&lt;/h1&gt;

&lt;p&gt;The &lt;code&gt;find&lt;/code&gt; command helps you search for files and directories across your filesystem based on name, type, size, modification time, permissions, and more.&lt;br&gt;&lt;br&gt;
Unlike &lt;code&gt;grep&lt;/code&gt;, which searches inside files, &lt;code&gt;find&lt;/code&gt; searches for files or directories themselves.&lt;br&gt;&lt;br&gt;
Here’s how to get comfortable with it.&lt;/p&gt;
&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Basic Syntax of find&lt;/li&gt;
&lt;li&gt;1. Find by Exact File Name&lt;/li&gt;
&lt;li&gt;2. Case-Insensitive File Name Search&lt;/li&gt;
&lt;li&gt;3. Find Files by Type&lt;/li&gt;
&lt;li&gt;4. Find Files by Extension&lt;/li&gt;
&lt;li&gt;5. Find Empty Files or Directories&lt;/li&gt;
&lt;li&gt;6. Find Files by Size&lt;/li&gt;
&lt;li&gt;7. Find Files by Modification Time&lt;/li&gt;
&lt;li&gt;8. Find Files Accessed Recently&lt;/li&gt;
&lt;li&gt;9. Find Files with Specific Permissions&lt;/li&gt;
&lt;li&gt;10. Find Files by Owner&lt;/li&gt;
&lt;li&gt;11. Find and Copy Files Owned by a User&lt;/li&gt;
&lt;li&gt;12. Find and Delete Files Owned by a User&lt;/li&gt;
&lt;li&gt;13. Find and Delete Files&lt;/li&gt;
&lt;li&gt;14. Find and List with Full Path&lt;/li&gt;
&lt;li&gt;15. Combine Multiple Conditions&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;li&gt;Let's Connect on LinkedIn&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Basic Syntax of find
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;find [starting_point] [options] [expression]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;starting_point&lt;/code&gt;: where the search begins (e.g., &lt;code&gt;.&lt;/code&gt; for current directory or &lt;code&gt;/home/user&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;options&lt;/code&gt; / &lt;code&gt;expression&lt;/code&gt;: what to look for (e.g., &lt;code&gt;-name&lt;/code&gt;, &lt;code&gt;-type&lt;/code&gt;, etc.)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  1. Find by Exact File Name
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;find &amp;lt;directory&amp;gt; -name &amp;lt;filename&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fed5weuzcvb3ak44fok6g.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fed5weuzcvb3ak44fok6g.jpg" alt="Find by Exact File Name" width="800" height="183"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;directory&amp;gt;&lt;/code&gt; means search from the current directory.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-name&lt;/code&gt; tells &lt;code&gt;find&lt;/code&gt; to look for a file with the exact name "notes.txt".&lt;/li&gt;
&lt;li&gt;If it finds the file, it will show you the full path.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  2. Case-Insensitive File Name Search
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;find &amp;lt;directory&amp;gt; -iname &amp;lt;filename&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft7433apr13zyeu13xka6.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft7433apr13zyeu13xka6.jpg" alt="Case-Insensitive File Name Search" width="800" height="190"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;-iname&lt;/code&gt; is just like &lt;code&gt;-name&lt;/code&gt; but ignores case.
So it will match &lt;code&gt;CASEi.txt&lt;/code&gt;, &lt;code&gt;Casei.TXT&lt;/code&gt;, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  3. Find Files by Type
&lt;/h2&gt;

&lt;p&gt;In the &lt;code&gt;find&lt;/code&gt; command, &lt;code&gt;-type&lt;/code&gt; is used to specify the type of file you're looking for.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Common values for &lt;code&gt;-type&lt;/code&gt;:&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;Letter&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;f&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Regular file (e.g., .txt, .log, .sh)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;d&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Directory&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;l&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Symbolic link&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;c&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Character device file (like &lt;code&gt;/dev/tty&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;b&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Block device file (like &lt;code&gt;/dev/sda&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;h3&gt;
  
  
  Examples:
&lt;/h3&gt;

&lt;p&gt;To find files only:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;find &amp;lt;directory&amp;gt; -type f
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3h2rdn0ylqp9syl82hh7.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3h2rdn0ylqp9syl82hh7.jpg" alt="To find files only" width="800" height="236"&gt;&lt;/a&gt;&lt;br&gt;
To find directories only:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;find . -type d
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is useful if you're searching inside complex folders.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Find Files by Extension
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;find &amp;lt;directory&amp;gt; -name "*.log"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh4y7pvv09q3mxum7s7hy.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh4y7pvv09q3mxum7s7hy.jpg" alt="Find Files by Extension" width="800" height="220"&gt;&lt;/a&gt;&lt;br&gt;
This finds all files ending in &lt;code&gt;.log&lt;/code&gt;.&lt;br&gt;&lt;br&gt;
You can use &lt;code&gt;-iname "*.log"&lt;/code&gt; to do it case-insensitively.&lt;/p&gt;
&lt;h2&gt;
  
  
  5. Find Empty Files or Directories
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;find &amp;lt;directory&amp;gt; -empty
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6es2sw3twrv375gmka2x.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6es2sw3twrv375gmka2x.jpg" alt="Find Empty Files or Directories&amp;lt;br&amp;gt;
" width="800" height="192"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Returns empty files or folders &lt;/li&gt;
&lt;li&gt;Useful for cleanup.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  6. Find Files by Size
&lt;/h2&gt;

&lt;p&gt;Find files smaller than 100 MB:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;find &amp;lt;directory&amp;gt; -size -500k
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F357jpj5su01zwqeg3zh1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F357jpj5su01zwqeg3zh1.jpg" alt="Find Files by Size" width="800" height="247"&gt;&lt;/a&gt;&lt;br&gt;
Find files larger than 10 MB:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;find &amp;lt;directory&amp;gt;  -size +10M
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To find files between 50MB and 100MB:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;find &amp;lt;directory&amp;gt; -size +50M -size -100M
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Size units:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;c&lt;/code&gt; = bytes
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;k&lt;/code&gt; = kilobytes
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;M&lt;/code&gt; = megabytes
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;G&lt;/code&gt; = gigabytes
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;-size -500k&lt;/code&gt; = smaller than 500 KB
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-size +1G&lt;/code&gt; = larger than 1 GB
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  7. Find Files by Modification Time
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;find &amp;lt;directory&amp;gt; -mtime -1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F29e8vs35nwtps4i6nzxz.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F29e8vs35nwtps4i6nzxz.jpg" alt="Find Files by Modification Time&amp;lt;br&amp;gt;
" width="800" height="258"&gt;&lt;/a&gt;&lt;br&gt;
Finds files modified in the last 1 day.&lt;br&gt;&lt;br&gt;
&lt;code&gt;-1&lt;/code&gt; means &lt;em&gt;less than&lt;/em&gt; 1 day ago.&lt;br&gt;&lt;br&gt;
Use &lt;code&gt;+7&lt;/code&gt; for files older than 7 days.&lt;/p&gt;
&lt;h2&gt;
  
  
  8. Find Files Accessed Recently
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;find &amp;lt;directory&amp;gt; -atime -2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbjkgn24qtu04podr0rjr.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbjkgn24qtu04podr0rjr.jpg" alt="Find Files Accessed Recently" width="800" height="248"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;-atime&lt;/code&gt; = accessed time.
&lt;/li&gt;
&lt;li&gt;Finds files accessed within the last 2 days.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  9. Find Files with Specific Permissions
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;find &amp;lt;directory&amp;gt; -perm 644
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbzs0a0ur1fdt726mukd1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbzs0a0ur1fdt726mukd1.jpg" alt="Find Files with Specific Permissions" width="800" height="243"&gt;&lt;/a&gt;&lt;br&gt;
Finds files with exact permission &lt;code&gt;755&lt;/code&gt; (owner can read/write &amp;amp; execute, group and others can read &amp;amp; write).&lt;/p&gt;

&lt;p&gt;Other modes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;-perm -mode&lt;/code&gt; = must have &lt;strong&gt;all&lt;/strong&gt; permission bits&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-perm /mode&lt;/code&gt; = match &lt;strong&gt;any&lt;/strong&gt; of the bits&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  10. Find Files by Owner
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;find &amp;lt;directory&amp;gt; -user &amp;lt;username&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frlnhfan6i3rppyoxif7x.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frlnhfan6i3rppyoxif7x.jpg" alt=" Find Files by Owner" width="800" height="219"&gt;&lt;/a&gt;&lt;br&gt;
Finds files owned by a specific user.&lt;br&gt;&lt;br&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;find /var/log -user john
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Useful for checking user activity or auditing.&lt;/p&gt;




&lt;h2&gt;
  
  
  11. Find and Copy Files Owned by a User
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;find &amp;lt;directory&amp;gt; -user &amp;lt;username&amp;gt; -exec cp {} &amp;lt;location&amp;gt; \;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Finds files owned by a user and copies each one to a backup folder.&lt;/li&gt;
&lt;li&gt;Replace &lt;code&gt;secteam&lt;/code&gt; with your desired backup path.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd1riv1jwu5uaf72lcd2h.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd1riv1jwu5uaf72lcd2h.jpg" alt="Image description" width="800" height="187"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  12. Find and Delete Files Owned by a User
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;find &amp;lt;directory&amp;gt; -user &amp;lt;username&amp;gt; -exec rm {} \;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Searches for files owned by the user and deletes them.
&lt;strong&gt;Be cautious, test first using &lt;code&gt;ls&lt;/code&gt; instead of &lt;code&gt;rm&lt;/code&gt;.&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  13. Find and Delete Files
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;find &amp;lt;directory&amp;gt; -name "filename" -exec rm {} \;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3gmxwwse5hwtlob1h3i4.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3gmxwwse5hwtlob1h3i4.jpg" alt="Find and Delete Files" width="800" height="223"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;-exec&lt;/code&gt; lets you run a command on each found file.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;{}&lt;/code&gt; is replaced with the filename.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;\;&lt;/code&gt; ends the &lt;code&gt;-exec&lt;/code&gt; command.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Test safely:&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;find &amp;lt;directory&amp;gt; -name "filename" -exec ls {} \;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  14. Find and List with Full Path
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;find "$(pwd)" -name "*.sh"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;$(pwd)&lt;/code&gt; gives full path of current directory.&lt;/li&gt;
&lt;li&gt;Useful to know exact locations of found files.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  15. Combine Multiple Conditions
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;find . -type f -name "*.log" -size +1M
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Finds all &lt;code&gt;.log&lt;/code&gt; files that are regular files and larger than 1 MB.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;From everyday maintenance to system-wide audits, the &lt;code&gt;find&lt;/code&gt; command proves its worth in countless scenarios.  &lt;/p&gt;

&lt;p&gt;Knowing how to use it efficiently can save you time and prevent costly mistakes.  &lt;/p&gt;

&lt;p&gt;Start with simple queries, build your confidence, and you'll soon be a &lt;code&gt;find&lt;/code&gt; command power user.&lt;/p&gt;

&lt;p&gt;&lt;a id="Let's Connect on LinkedIn"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Let’s connect on LinkedIn
&lt;/h2&gt;

&lt;p&gt;(&lt;a href="https://www.linkedin.com/in/chiamaka-chielo?utm_source=share&amp;amp;utm_campaign=share_via&amp;amp;utm_content=profile&amp;amp;utm_medium=android_app" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/chiamaka-chielo?utm_source=share&amp;amp;utm_campaign=share_via&amp;amp;utm_content=profile&amp;amp;utm_medium=android_app&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;As I automate my journey into RHCE and Ansible, I’d love to connect with fellow learners and professionals. Feel free to reach out and join me as I share tips, resources, and insights throughout this 30-day challenge.&lt;/p&gt;

&lt;h1&gt;
  
  
  cloudwhistler #30daysLinuxchallenge
&lt;/h1&gt;

</description>
      <category>cloudwhistler</category>
      <category>linux</category>
      <category>devops</category>
      <category>opensource</category>
    </item>
    <item>
      <title>grep Command in Linux</title>
      <dc:creator>Chielo Chiamaka </dc:creator>
      <pubDate>Mon, 12 May 2025 11:47:21 +0000</pubDate>
      <link>https://dev.to/chielo_chiamaka/grep-command-in-linux-34m5</link>
      <guid>https://dev.to/chielo_chiamaka/grep-command-in-linux-34m5</guid>
      <description>&lt;p&gt;When you're working with Linux log files, it's easy to rely on basic &lt;code&gt;grep&lt;/code&gt; searches and call it a day.&lt;/p&gt;

&lt;p&gt;But &lt;code&gt;grep&lt;/code&gt; has powerful options that can help you find exactly what you're looking for, faster and with more precision.&lt;/p&gt;

&lt;p&gt;Here are essential &lt;code&gt;grep&lt;/code&gt; options and commands to help you analyze your logs more effectively and detect potential threats faster.&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Common &lt;code&gt;grep&lt;/code&gt; Options Overview&lt;/li&gt;
&lt;li&gt;1. Search for a Keyword in a File&lt;/li&gt;
&lt;li&gt;2. Search for a Keyword in Multiple Files&lt;/li&gt;
&lt;li&gt;3. Show files that do NOT contain "server"&lt;/li&gt;
&lt;li&gt;4. Show line numbers with the match&lt;/li&gt;
&lt;li&gt;5. Search case-insensitively&lt;/li&gt;
&lt;li&gt;6. Show Match Count (-c)&lt;/li&gt;
&lt;li&gt;7. List Filenames with Matches (-l)&lt;/li&gt;
&lt;li&gt;8. Show Inverse Results (-v)&lt;/li&gt;
&lt;li&gt;9. Search for Lines Starting with a Keyword (^)&lt;/li&gt;
&lt;li&gt;10. Search for Lines Ending with a Keyword ($)&lt;/li&gt;
&lt;li&gt;11. Redirect Search Results into a File (&amp;gt;)&lt;/li&gt;
&lt;li&gt;12. Append Results into a File (&amp;gt;&amp;gt;)&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;li&gt;Let's Connect on LinkedIn&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Common &lt;code&gt;grep&lt;/code&gt; Options Overview
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Option&lt;/th&gt;
      &lt;th&gt;Description&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
&lt;td&gt;&lt;code&gt;-c&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Count only the number of matching lines&lt;/td&gt;
&lt;/tr&gt;
    &lt;tr&gt;
&lt;td&gt;&lt;code&gt;-i&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Ignore case when matching (case-insensitive search)&lt;/td&gt;
&lt;/tr&gt;
    &lt;tr&gt;
&lt;td&gt;&lt;code&gt;-v&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Invert match (show lines that do not match the pattern)&lt;/td&gt;
&lt;/tr&gt;
    &lt;tr&gt;
&lt;td&gt;&lt;code&gt;-n&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Show the line number of each matching line&lt;/td&gt;
&lt;/tr&gt;
    &lt;tr&gt;
&lt;td&gt;&lt;code&gt;-l&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;List file names that contain the match&lt;/td&gt;
&lt;/tr&gt;
    &lt;tr&gt;
&lt;td&gt;&lt;code&gt;-L&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;List file names that do not contain the match&lt;/td&gt;
&lt;/tr&gt;
    &lt;tr&gt;
&lt;td&gt;&lt;code&gt;^&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Anchor to match lines starting with the keyword (e.g., &lt;code&gt;^root&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
    &lt;tr&gt;
&lt;td&gt;&lt;code&gt;$&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Anchor to match lines ending with the keyword (e.g., &lt;code&gt;nologin$&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
    &lt;tr&gt;
&lt;td&gt;&lt;code&gt;&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Redirect output to a new file (overwrites the file)&lt;/td&gt;
&lt;/tr&gt;
    &lt;tr&gt;
&lt;td&gt;&lt;code&gt;&amp;gt;&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Append output to the end of an existing file (does not overwrite)&lt;/td&gt;
&lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  1. Search for a Keyword in a File
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;grep &amp;lt;Keyword&amp;gt; &amp;lt;Source&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Purpose&lt;/strong&gt;: Find all lines that contain "files".&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Expected Output&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;What it does:&lt;br&gt;
Scans the grep_test.txt file and returns lines that include the word "files".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftfpisjk7j98176f0ro0h.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftfpisjk7j98176f0ro0h.jpg" alt="Search for keyword in a file" width="800" height="190"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Explanation:&lt;br&gt;
This shows every line where "files" appears. It’s useful for checking which users or settings involve root privileges.&lt;/p&gt;
&lt;h2&gt;
  
  
  2. Search for a Keyword in Multiple Files
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;grep &amp;lt;keyword&amp;gt; &amp;lt;source1&amp;gt; &amp;lt;source2&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Expected Output&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmsrojc9r84zv78fxwcq1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmsrojc9r84zv78fxwcq1.jpg" alt="Keyword in multiple files" width="800" height="593"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Explanation:&lt;br&gt;
Each result shows the filename, line number, and the matching line. This is helpful for scanning system logs for error messages.&lt;/p&gt;
&lt;h2&gt;
  
  
  3. Show files that do NOT contain "server"
&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;grep&lt;/span&gt; &lt;span class="nt"&gt;-L&lt;/span&gt; &amp;lt;keyword&amp;gt; &amp;lt;&lt;span class="nb"&gt;source&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Purpose:&lt;br&gt;
List files that do NOT contain the word "server".&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Expected Output&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcyztvn4xe2muuyebou3m.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcyztvn4xe2muuyebou3m.jpg" alt="Files that do not contain " width="800" height="205"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If all files contain "server", you’ll see no output.&lt;br&gt;
If one file doesn’t, you'll see:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;log2.txt&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  4. Show line numbers with the match
&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;grep&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; &amp;lt;keyword&amp;gt; &amp;lt;&lt;span class="nb"&gt;source&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Expected Output&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0t8z2bqj2lxratynyldh.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0t8z2bqj2lxratynyldh.jpg" alt="Line numbers with match" width="800" height="247"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Each match is prefixed with:&lt;/p&gt;

&lt;p&gt;filename&lt;/p&gt;

&lt;p&gt;line number&lt;/p&gt;

&lt;p&gt;the line content containing the match&lt;/p&gt;
&lt;h2&gt;
  
  
  5. Search case-insensitively
&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;grep&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt; &amp;lt;keyword&amp;gt; &amp;lt;&lt;span class="nb"&gt;source&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Purpose:&lt;br&gt;
Search ignoring case (so server, SERVER, and Server are all valid matches).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Expected Output&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp62wggazomxujir2l67u.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp62wggazomxujir2l67u.jpg" alt="#5" width="800" height="258"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If any file had:&lt;/p&gt;

&lt;p&gt;SERVER CRASHED.&lt;/p&gt;

&lt;p&gt;It would show that too.&lt;/p&gt;
&lt;h2&gt;
  
  
  6. Show Match Count (-c)
&lt;/h2&gt;

&lt;p&gt;This option tells grep to show how many times the pattern appears in the file, rather than displaying the matching lines themselves.&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;-c&lt;/span&gt; &amp;lt;keyword&amp;gt; &amp;lt;&lt;span class="nb"&gt;source&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Expected Output&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6vpad25k4oe9kt4ydn2b.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6vpad25k4oe9kt4ydn2b.jpg" alt="#6" width="800" height="221"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  7. List Filenames with Matches (-l)
&lt;/h2&gt;

&lt;p&gt;This option shows only the names of files that contain the matching keyword, not the actual matching lines.&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;-l&lt;/span&gt; &amp;lt;keyword&amp;gt; &amp;lt;&lt;span class="nb"&gt;source&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Expected Output&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgmhzi8gn1cmlhmdkl59s.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgmhzi8gn1cmlhmdkl59s.jpg" alt="#7" width="800" height="241"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is helpful when you just want to know which files have the keyword, without seeing the lines themselves.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Show Inverse Results (-v)
&lt;/h2&gt;

&lt;p&gt;This option tells grep to show lines that do not match the given pattern.&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;-v&lt;/span&gt; &amp;lt;keyword&amp;gt; &amp;lt;&lt;span class="nb"&gt;source&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Expected Output&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Funvum7jmv508xgtar59c.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Funvum7jmv508xgtar59c.jpg" alt="#8" width="800" height="192"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The lines that do not contain "server" are displayed. This is useful if you want to exclude certain patterns from your search.&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Search for Lines Starting with a Keyword (^)
&lt;/h2&gt;

&lt;p&gt;The caret ^ is used to search for lines that start with the specified pattern.&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="s2"&gt;"^&amp;lt;keyword&amp;gt;"&lt;/span&gt; &amp;lt;&lt;span class="nb"&gt;source&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Expected Output&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmz3qvg1d9ew4l9eucvd0.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmz3qvg1d9ew4l9eucvd0.jpg" alt="#9" width="800" height="190"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The ^ symbol means the search looks for lines that begin with the given pattern. Here, it finds the line where "Restart" is at the start of the line.&lt;/p&gt;

&lt;h2&gt;
  
  
  10. Search for Lines Ending with a Keyword ($)
&lt;/h2&gt;

&lt;p&gt;The dollar sign $ is used to search for lines that end with the specified pattern.&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="s2"&gt;"&amp;lt;keyword&amp;gt;$"&lt;/span&gt; &amp;lt;&lt;span class="nb"&gt;source&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Expected Output&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fac9vozs2goxpvb8mpshm.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fac9vozs2goxpvb8mpshm.jpg" alt="#10" width="800" height="603"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The $ symbol signifies that the search looks for lines that end with the specified pattern&lt;/p&gt;

&lt;h2&gt;
  
  
  11. Redirect Search Results into a File (&amp;gt;)
&lt;/h2&gt;

&lt;p&gt;This option allows you to redirect the output of the grep command to a new file, overwriting any existing content.&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; &amp;lt;keyword&amp;gt; &amp;lt;&lt;span class="nb"&gt;source&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &amp;lt;destination_file&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnsfjudvz8zssd4qc1c53.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnsfjudvz8zssd4qc1c53.jpg" alt="#11" width="800" height="182"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;No output to the screen because it's redirected to server.txt.&lt;/p&gt;

&lt;p&gt;The content of errors.txt will be the lines from log1.txt containing the word "server".&lt;/p&gt;

&lt;p&gt;The &amp;gt; operator redirects the search results into the specified file, overwriting the file content.&lt;/p&gt;

&lt;h2&gt;
  
  
  12. Append Results into a File (&amp;gt;&amp;gt;)
&lt;/h2&gt;

&lt;p&gt;This option allows you to append the results of the grep command to an existing file, rather than overwriting it.&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; &amp;lt;keyword&amp;gt; &amp;lt;&lt;span class="nb"&gt;source&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &amp;lt;destination_file&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnecoyd5q95y2nm77f3bc.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnecoyd5q95y2nm77f3bc.jpg" alt="#12" width="800" height="268"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &amp;gt;&amp;gt; operator appends the output to the file, ensuring that existing content is preserved while adding new results&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Whether you're filtering logs, scanning config files, or troubleshooting issues, the right &lt;code&gt;grep&lt;/code&gt; option can save you time and give you clarity.&lt;/p&gt;

&lt;p&gt;&lt;a id="Let's Connect on LinkedIn"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Let’s connect on LinkedIn
&lt;/h2&gt;

&lt;p&gt;(&lt;a href="https://www.linkedin.com/in/chiamaka-chielo?utm_source=share&amp;amp;utm_campaign=share_via&amp;amp;utm_content=profile&amp;amp;utm_medium=android_app" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/chiamaka-chielo?utm_source=share&amp;amp;utm_campaign=share_via&amp;amp;utm_content=profile&amp;amp;utm_medium=android_app&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;As I automate my journey into RHCE and Ansible, I’d love to connect with fellow learners and professionals. Feel free to reach out and join me as I share tips, resources, and insights throughout this 30-day challenge.&lt;/p&gt;

&lt;h1&gt;
  
  
  cloudwhistler #30daysLinuxchallenge
&lt;/h1&gt;

</description>
      <category>cloudwhistler</category>
      <category>linux</category>
      <category>devops</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Linux Backup Strategies</title>
      <dc:creator>Chielo Chiamaka </dc:creator>
      <pubDate>Thu, 08 May 2025 10:02:55 +0000</pubDate>
      <link>https://dev.to/chielo_chiamaka/linux-backup-strategies-2pl1</link>
      <guid>https://dev.to/chielo_chiamaka/linux-backup-strategies-2pl1</guid>
      <description>&lt;p&gt;In enterprise Linux environments especially on RHEL-based systems, backups are a must.&lt;/p&gt;

&lt;p&gt;Backups are about resilience, recovery, and continuity.&lt;/p&gt;

&lt;p&gt;It shouldn't be treated as a “set-it-and-forget-it” task. &lt;/p&gt;

&lt;p&gt;If neglected, it will lead to serious gaps when incidents strike.&lt;/p&gt;

&lt;p&gt;Let’s break down common Linux specific backup strategy failures, and how to automate smarter, safer systems.&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;1. Single Point of Backup Failure&lt;/li&gt;
&lt;li&gt;2. No Backup Testing&lt;/li&gt;
&lt;li&gt;3. Infrequent Backup Schedules&lt;/li&gt;
&lt;li&gt;4. No Remote or Cloud Backups&lt;/li&gt;
&lt;li&gt;5. No Encryption or Access Control&lt;/li&gt;
&lt;li&gt;6. No Documented Recovery Plan&lt;/li&gt;
&lt;li&gt;7. No Compliance Awareness&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;li&gt;Let's Connect on LinkedIn&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  1. Single Point of Backup Failure
&lt;/h2&gt;

&lt;p&gt;Storing backups on the same disk (&lt;code&gt;/dev/sda1&lt;/code&gt; or &lt;code&gt;/home/backup&lt;/code&gt;) puts you one disk failure away from total data loss.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix&lt;/strong&gt;: Automate off-site backups with tools like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;rsync&lt;/code&gt; to a remote SSH server
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;rclone&lt;/code&gt; for cloud targets (S3, Google Drive)
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Restic&lt;/code&gt; or &lt;code&gt;Duplicity&lt;/code&gt; for encrypted, versioned backups
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2. No Backup Testing
&lt;/h2&gt;

&lt;p&gt;If you’ve never restored your backup, it might not work. Admins often skip testing restore procedures until it's too late.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix&lt;/strong&gt;: Automate testing using scripts that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Verify archive integrity (&lt;code&gt;tar -tvf&lt;/code&gt;, &lt;code&gt;sha256sum&lt;/code&gt;)
&lt;/li&gt;
&lt;li&gt;Perform dummy restores with &lt;code&gt;cron&lt;/code&gt;-scheduled dry runs
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;BorgBackup&lt;/strong&gt; (&lt;code&gt;prune&lt;/code&gt;, &lt;code&gt;verify&lt;/code&gt;)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Restic&lt;/strong&gt; (&lt;code&gt;check&lt;/code&gt;, &lt;code&gt;restore --verify&lt;/code&gt;)
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Infrequent Backup Schedules
&lt;/h2&gt;

&lt;p&gt;Manual weekly backups or inconsistent cron jobs are risky especially for systems with frequent config or database changes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix&lt;/strong&gt;: Use automation tools and schedules like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;cron&lt;/code&gt; + &lt;code&gt;rsnapshot&lt;/code&gt; for versioned backups
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;systemd&lt;/code&gt; timers for reliability and logging
&lt;/li&gt;
&lt;li&gt;Ansible playbooks to deploy consistent backup routines across environments
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4. No Remote or Cloud Backups
&lt;/h2&gt;

&lt;p&gt;Storing to a USB drive or NAS isn’t enough if disaster strikes your site.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix&lt;/strong&gt;: Automate secure, remote backups with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;rclone&lt;/code&gt; or &lt;code&gt;Restic&lt;/code&gt; + &lt;code&gt;cron&lt;/code&gt;/&lt;code&gt;systemd&lt;/code&gt; timers to S3, Azure, or Google Cloud
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Duplicity&lt;/code&gt; for incremental encrypted backups with cloud support
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. No Encryption or Access Control
&lt;/h2&gt;

&lt;p&gt;Plain-text backups stored in &lt;code&gt;/opt/backups&lt;/code&gt; with &lt;code&gt;chmod 777&lt;/code&gt;? That’s an insider threat waiting to happen.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix&lt;/strong&gt;: Automate with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;gpg&lt;/code&gt; encryption in backup scripts
&lt;/li&gt;
&lt;li&gt;Access control via group permissions and &lt;code&gt;sudoers&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Backup targets mounted only during scheduled jobs
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  6. No Documented Recovery Plan
&lt;/h2&gt;

&lt;p&gt;Even if backups exist, teams often don’t know where they are, how to restore, or who’s responsible.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix&lt;/strong&gt;: Include a disaster recovery automation plan with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Versioned documentation (&lt;code&gt;README.md&lt;/code&gt;, runbooks)
&lt;/li&gt;
&lt;li&gt;Bash or Ansible scripts for automated restoration
&lt;/li&gt;
&lt;li&gt;Monitoring alerts (Nagios, Zabbix, or Prometheus + Alertmanager) for failed backups
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  7. No Compliance Awareness
&lt;/h2&gt;

&lt;p&gt;Healthcare, finance, or government orgs have specific retention and encryption rules—and noncompliance is costly.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Automate log backups (&lt;code&gt;logrotate&lt;/code&gt;, &lt;code&gt;auditd&lt;/code&gt;)
&lt;/li&gt;
&lt;li&gt;Ensure compliance with data retention scripts + &lt;code&gt;cron&lt;/code&gt; schedules
&lt;/li&gt;
&lt;li&gt;Use backup tools that support GPG, incremental backup metadata, and logging
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Linux servers offer robust flexibility and control, but a lack of adequate backup strategies can lead to significant risks.&lt;/p&gt;

&lt;p&gt;Ensure your Linux-based systems are protected by a solid backup plan and disaster recovery procedure &lt;strong&gt;don’t wait for a crisis to test your recovery.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a id="Let's Connect on LinkedIn"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Let’s connect on LinkedIn
&lt;/h2&gt;

&lt;p&gt;(&lt;a href="https://www.linkedin.com/in/chiamaka-chielo?utm_source=share&amp;amp;utm_campaign=share_via&amp;amp;utm_content=profile&amp;amp;utm_medium=android_app" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/chiamaka-chielo?utm_source=share&amp;amp;utm_campaign=share_via&amp;amp;utm_content=profile&amp;amp;utm_medium=android_app&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;As I automate my journey into RHCE and Ansible, I’d love to connect with fellow learners and professionals. Feel free to reach out and join me as I share tips, resources, and insights throughout this 30-day challenge.&lt;/p&gt;

&lt;h1&gt;
  
  
  cloudwhistler #30daysLinuxchallenge
&lt;/h1&gt;

</description>
      <category>cloudwhistler</category>
      <category>devops</category>
      <category>linux</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Avoid the Mistakes That Led to the NTT Breach: Secure Linux User Onboarding and Access Control</title>
      <dc:creator>Chielo Chiamaka </dc:creator>
      <pubDate>Mon, 05 May 2025 10:39:03 +0000</pubDate>
      <link>https://dev.to/chielo_chiamaka/avoid-the-mistakes-that-led-to-the-ntt-breach-secure-linux-user-onboarding-and-access-control-4llo</link>
      <guid>https://dev.to/chielo_chiamaka/avoid-the-mistakes-that-led-to-the-ntt-breach-secure-linux-user-onboarding-and-access-control-4llo</guid>
      <description>&lt;p&gt;&lt;strong&gt;18,000 organizations paid the price for poor access control.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
 Don’t let yours be the next headline.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;NTT Communications breach&lt;/strong&gt; showed us what happens when user permissions and privileges are mismanaged. Attackers exploited weak access control and exposed sensitive data from over &lt;strong&gt;18,000 organizations&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Security should be a top priority in every organization, it’s not something to joke with.&lt;/p&gt;

&lt;p&gt;With that mindset, I approached this mini project focused on securing a Linux environment. &lt;/p&gt;

&lt;p&gt;I simulated the onboarding of a technical team by creating secure user and group accounts, assigning minimal and appropriate privileges, enforcing password policies, and implementing basic monitoring, all to ensure sensitive data remains protected.&lt;/p&gt;
&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Scenario: You’re the SysAdmin&lt;/li&gt;
&lt;li&gt;1. Create a New Group&lt;/li&gt;
&lt;li&gt;2. Create User Accounts&lt;/li&gt;
&lt;li&gt;3. Secure Home Directories&lt;/li&gt;
&lt;li&gt;4. Assign Sudo Access to Team Lead&lt;/li&gt;
&lt;li&gt;
5. Implement Security Policies

&lt;ul&gt;
&lt;li&gt;a. Password Complexity&lt;/li&gt;
&lt;li&gt;b. Password Expiry&lt;/li&gt;
&lt;li&gt;c. Protect Sensitive Files&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;6. Shared Directory for Collaboration&lt;/li&gt;
&lt;li&gt;7. Basic Monitoring&lt;/li&gt;
&lt;li&gt;Best Practices Recap&lt;/li&gt;
&lt;li&gt;Conclusion: Secure by Design&lt;/li&gt;
&lt;li&gt;Let's Connect on LinkedIn&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Scenario: You’re the SysAdmin
&lt;/h2&gt;

&lt;p&gt;You’ve been assigned to set up a secure system for a newly hired technical team. Your goals:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create users and groups
&lt;/li&gt;
&lt;li&gt;Apply controlled access
&lt;/li&gt;
&lt;li&gt;Enforce security policies
&lt;/li&gt;
&lt;li&gt;Protect sensitive data
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  1. Create a New Group
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6kh5iaeqqjj9vaafjwvd.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6kh5iaeqqjj9vaafjwvd.jpg" alt="new group" width="800" height="209"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  2. Create User Accounts
&lt;/h2&gt;

&lt;p&gt;Create three users (&lt;code&gt;mr.a&lt;/code&gt;, &lt;code&gt;mr.b&lt;/code&gt;, &lt;code&gt;mrs.c&lt;/code&gt;), add them to the &lt;code&gt;tech_team&lt;/code&gt;, and set their passwords:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd6ik97rzc2m3ba97mmww.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd6ik97rzc2m3ba97mmww.jpg" alt="useradd" width="800" height="191"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fejfcds1qq283z5dl69hd.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fejfcds1qq283z5dl69hd.jpg" alt="Image description" width="800" height="200"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo passwd mr.a
sudo passwd mrs.c
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Force password change on first login&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo320722jed7ghd8b85n5.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo320722jed7ghd8b85n5.jpg" alt="force password change" width="800" height="257"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Secure Home Directories
&lt;/h2&gt;

&lt;p&gt;Ensure each user’s home is private:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4ubhf6alx7i5j3cgis75.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4ubhf6alx7i5j3cgis75.jpg" alt="Secure Home Directories" width="800" height="201"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Assign Sudo Access to Team Lead
&lt;/h2&gt;

&lt;p&gt;Give sudo rights to the team lead only:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzspf3bpum5324rba0cwp.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzspf3bpum5324rba0cwp.jpg" alt="Sudo Access" width="800" height="211"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Leave &lt;code&gt;mr.a&lt;/code&gt; and &lt;code&gt;mrs.c&lt;/code&gt; as regular users.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Implement Security Policies
&lt;/h2&gt;

&lt;h3&gt;
  
  
  a. Password Complexity
&lt;/h3&gt;

&lt;p&gt;Edit the PAM config:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu7z8l13i1kh2gg8bttyk.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu7z8l13i1kh2gg8bttyk.jpg" alt="Image description" width="800" height="203"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Set the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;minlen = 10
dcredit = -1
ucredit = -1
ocredit = -1
lcredit = -1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;abc123&lt;/code&gt; → Rejected
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Password1!&lt;/code&gt; → Accepted&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  b. Password Expiry
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1xavaauxv9xp03w603li.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1xavaauxv9xp03w603li.jpg" alt="Password Expiry" width="800" height="215"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  c. Protect Sensitive Files
&lt;/h3&gt;

&lt;p&gt;Restrict file access:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo chmod 600 /var/log/auth.log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Encrypt sensitive files:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gpg -c secret_file.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  6. Shared Directory for Collaboration
&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 mkdir&lt;/span&gt; /project_data
&lt;span class="nb"&gt;sudo chown&lt;/span&gt; :tech_team /project_data
&lt;span class="nb"&gt;sudo chmod &lt;/span&gt;770 /project_data
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This lets team members collaborate while keeping outsiders out.&lt;/p&gt;




&lt;h2&gt;
  
  
  7. Basic Monitoring
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;User login 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;last
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Track sudo usage:&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; &lt;span class="s1"&gt;'sudo'&lt;/span&gt; /var/log/auth.log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Monitor unauthorized privilege escalations early.&lt;/p&gt;

&lt;h2&gt;
  
  
  Best Practices Recap
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Principle of Least Privilege (PoLP):&lt;/strong&gt; Only give users access to what they need.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Access Audits:&lt;/strong&gt; Periodically review group and user access.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Password Policies:&lt;/strong&gt; Complexity, expiry, and rotation.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monitoring &amp;amp; Alerts:&lt;/strong&gt; Use logs and tools to spot anomalies early.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion: Secure by Design
&lt;/h2&gt;

&lt;p&gt;Ignoring access control is &lt;strong&gt;costly&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Secure user onboarding, granular permissions, and proactive monitoring are &lt;strong&gt;non-negotiables&lt;/strong&gt; in today’s landscape.&lt;/p&gt;

&lt;p&gt;By applying these Linux-based practices, you reduce your organization’s attack surface and &lt;strong&gt;stay out of the headlines&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a id="Let's Connect on LinkedIn"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Let’s connect on LinkedIn
&lt;/h2&gt;

&lt;p&gt;(&lt;a href="https://www.linkedin.com/in/chiamaka-chielo?utm_source=share&amp;amp;utm_campaign=share_via&amp;amp;utm_content=profile&amp;amp;utm_medium=android_app" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/chiamaka-chielo?utm_source=share&amp;amp;utm_campaign=share_via&amp;amp;utm_content=profile&amp;amp;utm_medium=android_app&lt;/a&gt;)&lt;/p&gt;

</description>
      <category>cloudwhistler</category>
      <category>linux</category>
      <category>devops</category>
      <category>security</category>
    </item>
    <item>
      <title>System Performance Monitoring</title>
      <dc:creator>Chielo Chiamaka </dc:creator>
      <pubDate>Sat, 03 May 2025 11:54:24 +0000</pubDate>
      <link>https://dev.to/chielo_chiamaka/system-performance-monitoring-36no</link>
      <guid>https://dev.to/chielo_chiamaka/system-performance-monitoring-36no</guid>
      <description>&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Why Monitoring Matters&lt;/li&gt;
&lt;li&gt;
What to Monitor (Key Performance Metrics)

&lt;ul&gt;
&lt;li&gt;1. CPU Usage&lt;/li&gt;
&lt;li&gt;2. Memory Usage&lt;/li&gt;
&lt;li&gt;3. Disk I/O and Storage&lt;/li&gt;
&lt;li&gt;4. Network Usage&lt;/li&gt;
&lt;li&gt;5. Processes and Services&lt;/li&gt;
&lt;li&gt;6. System Logs&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Tools to Automate Monitoring&lt;/li&gt;

&lt;li&gt;Best Practices&lt;/li&gt;

&lt;li&gt;Conclusion&lt;/li&gt;

&lt;li&gt;Let's Connect on LinkedIn&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;a id="why-monitoring-matters"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;You’ve updated your systems. Applied patches. Everything seems fine.&lt;/p&gt;

&lt;p&gt;But no system can be truly secure or efficient without &lt;strong&gt;ongoing monitoring&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lack of Monitoring Leads to Vulnerability:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No logs = No alerts&lt;/strong&gt; = delayed response to attacks or resource exhaustion
&lt;/li&gt;
&lt;li&gt;No visibility means attackers could go unnoticed (e.g., unauthorized SSH access)
&lt;/li&gt;
&lt;li&gt;Unpatched systems or performance spikes might indicate compromise but without monitoring, you'd never know.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cybercriminals thrive in the dark. Monitoring shines a light.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In a production environment, a &lt;strong&gt;slow server is more dangerous than a down server.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Because it appears to be working until users start complaining.&lt;/p&gt;

&lt;p&gt;That’s where system performance monitoring comes in.&lt;/p&gt;

&lt;p&gt;Linux monitoring acts as your &lt;strong&gt;early warning system&lt;/strong&gt;, ensuring the system is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Available&lt;/strong&gt; (users and applications can access it)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Responsive&lt;/strong&gt; (no slowdowns or timeouts)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Efficient&lt;/strong&gt; (resources are used properly)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stable&lt;/strong&gt; (no unexpected crashes or overloads)
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a id="what-to-monitor-key-performance-metrics"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What to Monitor (Key Performance Metrics)
&lt;/h2&gt;

&lt;p&gt;&lt;a id="1-cpu-usage"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. CPU Usage
&lt;/h3&gt;

&lt;p&gt;Tracks how much processor time is being used.&lt;br&gt;&lt;br&gt;
High usage may indicate heavy processes or a bottleneck.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tools&lt;/strong&gt;: &lt;code&gt;top&lt;/code&gt;, &lt;code&gt;htop&lt;/code&gt;, &lt;code&gt;mpstat&lt;/code&gt;, &lt;code&gt;sar&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a id="2-memory-usage"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Memory Usage
&lt;/h3&gt;

&lt;p&gt;Includes RAM and swap usage.&lt;br&gt;&lt;br&gt;
Consistently high memory could lead to thrashing.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tools&lt;/strong&gt;: &lt;code&gt;free -m&lt;/code&gt;, &lt;code&gt;vmstat&lt;/code&gt;, &lt;code&gt;top&lt;/code&gt;, &lt;code&gt;smem&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a id="3-disk-io-and-storage"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Disk I/O and Storage
&lt;/h3&gt;

&lt;p&gt;Monitors how fast and frequently the disk is being read/written to.&lt;br&gt;&lt;br&gt;
Disk bottlenecks can affect database performance, logging, backups, etc.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tools&lt;/strong&gt;: &lt;code&gt;iostat&lt;/code&gt;, &lt;code&gt;iotop&lt;/code&gt;, &lt;code&gt;df -h&lt;/code&gt;, &lt;code&gt;du&lt;/code&gt;, &lt;code&gt;lsblk&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a id="4-network-usage"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Network Usage
&lt;/h3&gt;

&lt;p&gt;Measures traffic in/out, bandwidth usage, and errors.&lt;br&gt;&lt;br&gt;
Helps detect congestion, packet loss, or DDoS attacks.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tools&lt;/strong&gt;: &lt;code&gt;iftop&lt;/code&gt;, &lt;code&gt;nethogs&lt;/code&gt;, &lt;code&gt;netstat&lt;/code&gt;, &lt;code&gt;ss&lt;/code&gt;, &lt;code&gt;ping&lt;/code&gt;, &lt;code&gt;traceroute&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a id="5-processes-and-services"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Processes and Services
&lt;/h3&gt;

&lt;p&gt;Ensures critical services are running and performing as expected.&lt;br&gt;&lt;br&gt;
Tracks resource-hungry or zombie processes.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tools&lt;/strong&gt;: &lt;code&gt;ps aux&lt;/code&gt;, &lt;code&gt;systemctl status&lt;/code&gt;, &lt;code&gt;top&lt;/code&gt;, &lt;code&gt;journalctl&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a id="6-system-logs"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  6. System Logs
&lt;/h3&gt;

&lt;p&gt;Check logs for warnings, errors, failed authentications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Location&lt;/strong&gt;:&lt;br&gt;&lt;br&gt;
&lt;code&gt;/var/log/&lt;/code&gt;, &lt;code&gt;/var/log/messages&lt;/code&gt;, &lt;code&gt;/var/log/syslog&lt;/code&gt;, &lt;code&gt;/var/log/auth.log&lt;/code&gt;  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tools&lt;/strong&gt;: &lt;code&gt;tail -f&lt;/code&gt;, &lt;code&gt;grep&lt;/code&gt;, &lt;code&gt;journalctl&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a id="tools-to-automate-monitoring"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Tools to Automate Monitoring
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Glances&lt;/strong&gt; : real-time overview
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zabbix&lt;/strong&gt; :  graphs, alerts, dashboard
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Netdata&lt;/strong&gt; :  intuitive web UI
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Nagios&lt;/strong&gt; :  powerful alert system
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prometheus + Grafana&lt;/strong&gt; : modern dashboards and metrics
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;While tools are essential, monitoring is not just about tools.&lt;/p&gt;

&lt;p&gt;It’s about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Setting performance thresholds
&lt;/li&gt;
&lt;li&gt;Understanding baselines
&lt;/li&gt;
&lt;li&gt;Creating alert systems
&lt;/li&gt;
&lt;li&gt;Interpreting logs and metrics to make informed decisions
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a id="best-practices"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Best Practices
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Set alerts for CPU, memory, disk, and network
&lt;/li&gt;
&lt;li&gt;Establish baseline performance
&lt;/li&gt;
&lt;li&gt;Monitor trends to scale resources ahead
&lt;/li&gt;
&lt;li&gt;Combine command-line tools with automated platforms
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a id="conclusion"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Monitoring = Tools + Skills + Logs + Baselines + Action Plan&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;System monitoring is a preventive shield, a performance enhancer, and your early warning system.&lt;/p&gt;

&lt;p&gt;You don’t need to wait until there's a problem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Start watching now before someone else is watching for you.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a id="Let's Connect on LinkedIn"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Let’s connect on LinkedIn
&lt;/h2&gt;

&lt;p&gt;(&lt;a href="https://www.linkedin.com/in/chiamaka-chielo?utm_source=share&amp;amp;utm_campaign=share_via&amp;amp;utm_content=profile&amp;amp;utm_medium=android_app" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/chiamaka-chielo?utm_source=share&amp;amp;utm_campaign=share_via&amp;amp;utm_content=profile&amp;amp;utm_medium=android_app&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;As I automate my journey into RHCE and Ansible, I’d love to connect with fellow learners and professionals. Feel free to reach out and join me as I share tips, resources, and insights throughout this 30-day challenge.&lt;/p&gt;

&lt;h1&gt;
  
  
  cloudwhistler #30daysLinuxchallenge
&lt;/h1&gt;

</description>
      <category>cloudwhistler</category>
      <category>linux</category>
      <category>devops</category>
      <category>sysadmin</category>
    </item>
    <item>
      <title>From Manual Patching to Automation: Introducing Red Hat Satellite</title>
      <dc:creator>Chielo Chiamaka </dc:creator>
      <pubDate>Thu, 01 May 2025 09:12:05 +0000</pubDate>
      <link>https://dev.to/chielo_chiamaka/from-manual-patching-to-automation-introducing-red-hat-satellite-4omm</link>
      <guid>https://dev.to/chielo_chiamaka/from-manual-patching-to-automation-introducing-red-hat-satellite-4omm</guid>
      <description>&lt;p&gt;Managing patches manually is fine until your infrastructure grows.&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;What is Red Hat Satellite?&lt;/li&gt;
&lt;li&gt;Why Use Red Hat Satellite for Patch Management?&lt;/li&gt;
&lt;li&gt;How It Works (At a Glance)&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;li&gt;Let's Connect on LinkedIn&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Yesterday, we explored how to perform system updates and manage patches manually on Linux systems.&lt;/p&gt;

&lt;p&gt;But what if you’re managing dozens or even hundreds of RHEL servers?&lt;/p&gt;

&lt;p&gt;Let’s say your organization runs 200 RHEL servers. Instead of logging in one by one to run &lt;code&gt;dnf update&lt;/code&gt;, you could:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Approve updates in Satellite
&lt;/li&gt;
&lt;li&gt;Schedule a patch window
&lt;/li&gt;
&lt;li&gt;Monitor update success from a centralized dashboard
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All automated. All centralized.&lt;/p&gt;

&lt;p&gt;That’s where Red Hat Satellite comes in.&lt;/p&gt;

&lt;p&gt;&lt;a id="what-is-red-hat-satellite"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;h2&gt;
  
  
  What is Red Hat Satellite?
&lt;/h2&gt;

&lt;p&gt;Red Hat Satellite is a systems management platform that helps system administrators:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Provision and deploy Red Hat systems at scale
&lt;/li&gt;
&lt;li&gt;Automate patch management and system updates
&lt;/li&gt;
&lt;li&gt;Ensure compliance with security policies
&lt;/li&gt;
&lt;li&gt;Centrally manage software repositories and configurations
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a id="why-use-red-hat-satellite-for-patch-management"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;h2&gt;
  
  
  Why Use Red Hat Satellite for Patch Management?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Centralized Control&lt;/strong&gt;: Manage all updates from a single interface  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Scheduling&lt;/strong&gt;: Automate patching to reduce manual workload and downtime  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Custom Repos&lt;/strong&gt;: Push only approved and tested packages  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Compliance&lt;/strong&gt;: Track and audit which systems need updates or fail security checks  &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fue55r7rl311nelq0u64c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fue55r7rl311nelq0u64c.png" alt="RedHat Statelite" width="660" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a id="how-it-works-at-a-glance"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;h2&gt;
  
  
  How It Works (At a Glance)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Satellite Server&lt;/strong&gt; pulls content from the Red Hat Customer Portal
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Capsule Servers&lt;/strong&gt; act as proxies to distribute content locally
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clients&lt;/strong&gt; (managed systems) register with Satellite and receive updates based on policies
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a id="conclusion"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Manual patching can work for a while. But as your environment scales, so does the complexity and risk of missing critical updates.&lt;/p&gt;

&lt;p&gt;Red Hat Satellite gives you the tools to automate patch management, ensure compliance, and streamline updates across all your RHEL systems from a single interface.&lt;/p&gt;

&lt;p&gt;&lt;a id="Let's Connect on LinkedIn"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Let’s connect on LinkedIn
&lt;/h2&gt;

&lt;p&gt;(&lt;a href="https://www.linkedin.com/in/chiamaka-chielo?utm_source=share&amp;amp;utm_campaign=share_via&amp;amp;utm_content=profile&amp;amp;utm_medium=android_app" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/chiamaka-chielo?utm_source=share&amp;amp;utm_campaign=share_via&amp;amp;utm_content=profile&amp;amp;utm_medium=android_app&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;As I automate my journey into RHCE and Ansible, I’d love to connect with fellow learners and professionals. Feel free to reach out and join me as I share tips, resources, and insights throughout this 30-day challenge.&lt;/p&gt;

&lt;h1&gt;
  
  
  cloudwhistler #30daysLinuxchallenge
&lt;/h1&gt;

</description>
      <category>cloudwhistler</category>
      <category>redhat</category>
      <category>linux</category>
      <category>devops</category>
    </item>
    <item>
      <title>System Upgrades and Patch Management in Linux</title>
      <dc:creator>Chielo Chiamaka </dc:creator>
      <pubDate>Tue, 29 Apr 2025 09:48:43 +0000</pubDate>
      <link>https://dev.to/chielo_chiamaka/system-upgrades-and-patch-management-in-linux-4p4n</link>
      <guid>https://dev.to/chielo_chiamaka/system-upgrades-and-patch-management-in-linux-4p4n</guid>
      <description>&lt;p&gt;Linux, being an open-source and multi-user system, requires regular updates to ensure optimal security, performance, and stability.&lt;/p&gt;

&lt;p&gt;Without proper management, outdated packages and security vulnerabilities can make your system prone to attacks, performance degradation, and failures.&lt;/p&gt;

&lt;p&gt;Keeping things updated means your system stays secure, stable, and fast.&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;What is a System Upgrade in Linux?&lt;/li&gt;
&lt;li&gt;Types of Upgrades&lt;/li&gt;
&lt;li&gt;Why Patch Management is Essential&lt;/li&gt;
&lt;li&gt;How to Perform System Upgrades and Manage Patches on Linux&lt;/li&gt;
&lt;li&gt;Debian/Ubuntu-based Systems&lt;/li&gt;
&lt;li&gt;RedHat/CentOS/Fedora-based Systems&lt;/li&gt;
&lt;li&gt;Automating System Upgrades and Patch Management&lt;/li&gt;
&lt;li&gt;Best Practices&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;li&gt;Let's Connect on LinkedIn&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a id="what-is-a-system-upgrade-in-linux"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;A system upgrade in Linux involves updating the operating system or installed packages to the latest versions.&lt;/p&gt;

&lt;p&gt;&lt;a id="types-of-upgrades"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Types of Upgrades
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Full System Upgrade: Jumping to a new major OS version (Ubuntu 20.04 - 22.04)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Package Upgrade: Updating specific software (like nginx, MySQL, etc.)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a id="why-patch-management-is-essential"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Patch Management is Essential
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Security: Security patches address vulnerabilities that could be exploited by attackers to compromise your system.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Stability: Updates often fix software bugs or issues that can cause instability or crashes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Performance: Some patches are designed to improve performance, reduce system resource consumption, and fix compatibility issues.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Regular patch management ensures that your Linux system remains secure and reliable.&lt;/p&gt;

&lt;p&gt;&lt;a id="how-to-perform-system-upgrades-and-manage-patches-on-linux"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Perform System Upgrades and Manage Patches on Linux
&lt;/h2&gt;

&lt;p&gt;Managing system upgrades and patches is one of the most critical tasks for any Linux administrator. Fortunately, Linux provides robust package management systems to help manage updates efficiently. &lt;/p&gt;

&lt;p&gt;Below are common ways to perform upgrades and manage patches across popular Linux distributions:&lt;/p&gt;

&lt;p&gt;&lt;a id="debianubuntu-based-systems"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Debian/Ubuntu-based Systems
&lt;/h2&gt;

&lt;p&gt;Debian-based distributions, like Ubuntu, use the apt package manager for handling upgrades and patch installations.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Update package list:
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Upgrade installed packages:
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Full system upgrade:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt dist-upgrade
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Security updates:&lt;/strong&gt; Install security patches automatically using the unattended-upgrades tool:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install unattended-upgrades

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;a id="redhatcentosfedora-based-systems"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  RedHat/CentOS/Fedora-based Systems
&lt;/h2&gt;

&lt;p&gt;Red Hat-based distributions use the yum (for older versions) or dnf (for newer versions) package managers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update all packages:&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;sudo yum update

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;or for newer versions&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;sudo dnf update

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Security updates only:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo yum update --security

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;or for newer versions&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;sudo dnf update --security

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Schedule automatic updates:
You can configure automatic updates by enabling yum-cron or dnf-automatic.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a id="automating-system-upgrades-and-patch-management"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Automating System Upgrades and Patch Management
&lt;/h2&gt;

&lt;p&gt;To prevent missing critical security patches, automation is key.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;On Ubuntu:&lt;/strong&gt; Use unattended-upgrades to automatically install security patches:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install unattended-upgrades

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;On CentOS/RHEL:&lt;/strong&gt; Use yum-cron or dnf-automatic to automatically apply updates:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo yum install yum-cron
sudo systemctl enable yum-cron
sudo systemctl start yum-cron

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a id="best-practices"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Best Practices
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Update Regularly: Set a schedule (daily or weekly).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Test Before Pushing to Production: Use a staging server.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Automate Security Updates: Saves time and reduces risks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Backup Before Major Upgrades: Always.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Stay Informed: Watch security advisories for your distro.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Avoid chmod 777: Only give the permissions needed, no more.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Audit Your System: Use tools like Lynis, chkrootkit, rkhunter regularly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Plan Major Upgrades Carefully: Check app compatibility first.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a id="conclusion"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;System upgrades and patch management are not just routine tasks but essential practices to ensure the security and stability of your Linux systems.&lt;/p&gt;

&lt;p&gt;By regularly applying updates and patches, automating the process, and following best practices, you can protect your system from vulnerabilities, improve its performance, and keep it running smoothly.&lt;/p&gt;

&lt;p&gt;&lt;a id="Let's Connect on LinkedIn"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Let’s connect on LinkedIn
&lt;/h2&gt;

&lt;p&gt;(&lt;a href="https://www.linkedin.com/in/chiamaka-chielo?utm_source=share&amp;amp;utm_campaign=share_via&amp;amp;utm_content=profile&amp;amp;utm_medium=android_app" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/chiamaka-chielo?utm_source=share&amp;amp;utm_campaign=share_via&amp;amp;utm_content=profile&amp;amp;utm_medium=android_app&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;As I automate my journey into RHCE and Ansible, I’d love to connect with fellow learners and professionals. Feel free to reach out and join me as I share tips, resources, and insights throughout this 30-day challenge.&lt;/p&gt;

&lt;h1&gt;
  
  
  cloudwhistler #30daysLinuxchallenge
&lt;/h1&gt;

</description>
      <category>cloudwhistler</category>
      <category>linux</category>
      <category>redhat</category>
      <category>devops</category>
    </item>
    <item>
      <title>RHEL 9 System Boot Stuck at GNOME Display Manager (GDM) : Troubleshooting Guide</title>
      <dc:creator>Chielo Chiamaka </dc:creator>
      <pubDate>Sat, 26 Apr 2025 14:19:07 +0000</pubDate>
      <link>https://dev.to/chielo_chiamaka/rhel-9-system-boot-stuck-at-gnome-display-manager-gdm-troubleshooting-guide-3ja7</link>
      <guid>https://dev.to/chielo_chiamaka/rhel-9-system-boot-stuck-at-gnome-display-manager-gdm-troubleshooting-guide-3ja7</guid>
      <description>&lt;p&gt;Recently, after updating and upgrading my RHEL 9 system using dnf, I encountered an issue where the system froze at "Starting GNOME Display Manager (GDM)."&lt;/p&gt;

&lt;p&gt;This guide outlines the troubleshooting steps I followed to successfully resolve it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;What is GNOME Display Manager (GDM)?&lt;/li&gt;
&lt;li&gt;Common Causes of GDM Hanging Issues&lt;/li&gt;
&lt;li&gt;Troubleshooting Steps&lt;/li&gt;
&lt;li&gt;1. Switch to a TTY Console&lt;/li&gt;
&lt;li&gt;2. Restart GDM Service&lt;/li&gt;
&lt;li&gt;3. Review GDM Logs for Errors&lt;/li&gt;
&lt;li&gt;4. Reset GNOME Desktop Settings&lt;/li&gt;
&lt;li&gt;5. Boot into Multi-User Mode for Deeper Troubleshooting&lt;/li&gt;
&lt;li&gt;GNOME Session Shows "Unsupported Session Type"&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;li&gt;Let's Connect on LinkedIn&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a id="what-is-gnome-display-manager-gdm"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What is GNOME Display Manager (GDM)?&lt;/p&gt;

&lt;p&gt;The GNOME Display Manager (GDM) is a graphical login manager for Linux systems that use the GNOME desktop environment.&lt;br&gt;
Its key functions include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;User Authentication: Provides a secure graphical interface for login.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Session Management: Starts and manages user sessions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Customizable Interface: Offers a user-friendly login screen.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Display Server Support: Works with both X11 and Wayland display servers.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In simple terms, GDM acts as a bridge between the user and the GNOME desktop environment.&lt;/p&gt;

&lt;p&gt;&lt;a id="common-causes-of-gdm-hanging-issues"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Common Causes of GDM Hanging Issues
&lt;/h2&gt;

&lt;p&gt;The "Starting GNOME Display Manager" hang can occur due to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Package conflicts or incomplete updates.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Graphics driver issues.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Misconfigured system services.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe8jp3ee8b4uzlhc1s8ai.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe8jp3ee8b4uzlhc1s8ai.jpg" alt="Image description" width="800" height="598"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a id="troubleshooting-steps"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Troubleshooting Steps
&lt;/h2&gt;

&lt;p&gt;&lt;a id="1-switch-to-a-tty-console"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  1. Switch to a TTY Console
&lt;/h2&gt;

&lt;p&gt;When the system is stuck:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Press &lt;strong&gt;Ctrl + Alt + F2&lt;/strong&gt; (or F3/F4, depending on the system) to access a text-based terminal.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Log in with your credentials.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a id="2-restart-gdm-service"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  2. Restart GDM Service
&lt;/h2&gt;

&lt;p&gt;In the terminal, restart the GDM service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo systemctl restart gdm

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Sometimes, a simple restart can fix a stuck GDM.&lt;/p&gt;

&lt;p&gt;&lt;a id="3-review-gdm-logs-for-errors"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Review GDM Logs for Errors
&lt;/h2&gt;

&lt;p&gt;If restarting didn’t work, check the system logs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;journalctl -xeu gdm

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Look for specific error messages that can guide your next steps.&lt;/p&gt;

&lt;p&gt;&lt;a id="4-reset-gnome-desktop-settings"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Reset GNOME Desktop Settings
&lt;/h2&gt;

&lt;p&gt;If there are misconfigurations in the GNOME settings, resetting them might help:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dconf reset -f /org/gnome/

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, restart GDM:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo systemctl restart gdm

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a id="5-boot-into-multi-user-mode-for-deeper-troubleshooting"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Boot into Multi-User Mode for Deeper Troubleshooting
&lt;/h2&gt;

&lt;p&gt;If the problem persists:&lt;/p&gt;

&lt;p&gt;Reboot and access the GRUB menu &lt;strong&gt;(press Esc or Shift during boot)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Edit the boot entry and add:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;systemd.unit=multi-user.target

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Press &lt;strong&gt;Ctrl + X to boot&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This boots into a command-line environment (without GUI), allowing safer troubleshooting.&lt;/p&gt;

&lt;p&gt;&lt;a id="gnome-session-shows-unsupported-session-type"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  GNOME Session Shows "Unsupported Session Type"
&lt;/h2&gt;

&lt;p&gt;Error:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Window Manager Warning: Unsupported session type&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;How to Fix:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Check the session type:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;echo $XDG_SESSION_TYPE

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If it shows  &lt;strong&gt;tty&lt;/strong&gt;  instead of &lt;strong&gt;x11 or wayland,&lt;/strong&gt; your graphical session isn't active.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Start GNOME manually:
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Set the system to boot into graphical mode by default:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Check the default target:&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;systemctl get-default

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If it returns multi-user.target, change it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo systemctl set-default graphical.target
reboot

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a id="conclusion"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;If you ever encounter a GNOME Display Manager issue in RHEL 9, these steps should guide you to a solution. &lt;/p&gt;

&lt;p&gt;Always check system logs, verify configuration settings, and ensure your graphics drivers are up-to-date.&lt;/p&gt;

&lt;p&gt;&lt;a id="Let's Connect on LinkedIn"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Let’s connect on LinkedIn
&lt;/h2&gt;

&lt;p&gt;(&lt;a href="https://www.linkedin.com/in/chiamaka-chielo?utm_source=share&amp;amp;utm_campaign=share_via&amp;amp;utm_content=profile&amp;amp;utm_medium=android_app" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/chiamaka-chielo?utm_source=share&amp;amp;utm_campaign=share_via&amp;amp;utm_content=profile&amp;amp;utm_medium=android_app&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;As I automate my journey into RHCE and Ansible, I’d love to connect with fellow learners and professionals. Feel free to reach out and join me as I share tips, resources, and insights throughout this 30-day challenge.&lt;/p&gt;

&lt;h1&gt;
  
  
  cloudwhistler #30daysLinuxchallenge
&lt;/h1&gt;

</description>
      <category>cloudwhistler</category>
      <category>redhat</category>
      <category>linux</category>
      <category>devops</category>
    </item>
    <item>
      <title>Special Permissions in Linux (SUID, SGID &amp; Sticky Bit)</title>
      <dc:creator>Chielo Chiamaka </dc:creator>
      <pubDate>Thu, 24 Apr 2025 10:58:55 +0000</pubDate>
      <link>https://dev.to/chielo_chiamaka/special-permissions-in-linux-suid-sgid-sticky-bit-3nel</link>
      <guid>https://dev.to/chielo_chiamaka/special-permissions-in-linux-suid-sgid-sticky-bit-3nel</guid>
      <description>&lt;p&gt;In Linux environments, standard file permissions can fall short, especially when multiple users need to share files or run important commands. That’s where special permissions like SUID, SGID, and the Sticky Bit come in.&lt;/p&gt;

&lt;p&gt;They offer advanced control over file execution and directory behavior, making them essential for secure, collaborative systems.&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;What Are Special Permissions?&lt;/li&gt;
&lt;li&gt;1. SUID (Set User ID)&lt;/li&gt;
&lt;li&gt;2. SGID (Set Group ID)&lt;/li&gt;
&lt;li&gt;3. Sticky Bit&lt;/li&gt;
&lt;li&gt;Special Permissions: Numeric Mode&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;li&gt;Let's Connect on LinkedIn&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;a id="what-are-special-permissions"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What Are Special Permissions?
&lt;/h2&gt;

&lt;p&gt;There are three types of special permissions in Linux:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;SUID (Set User ID)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;SGID (Set Group ID)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Sticky Bit&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These are mainly applied to executable files and directories to control execution rights, inheritance, and deletion permissions in shared environments.&lt;/p&gt;

&lt;p&gt;&lt;a id="1-suid-set-user-id"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  1. SUID (Set User ID)
&lt;/h2&gt;

&lt;p&gt;When applied to an executable file, SUID allows any user to execute the file with the permissions of the file owner.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use Case:&lt;/strong&gt;&lt;br&gt;
The passwd command is owned by root, but regular users must use it to change their passwords.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ls -l /usr/bin/passwd 

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You’ll see:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;-rwsr-xr-x 1 root root 54256 Apr 23 09:32 /usr/bin/passwd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The s in the user/owner execute position represents the SUID bit.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To set SUID:&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;chmod u+s file_name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;To remove:&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;chmod u-s file_name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a id="2-sgid-set-group-id"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. SGID (Set Group ID)
&lt;/h2&gt;

&lt;p&gt;SGID has two behaviors:&lt;/p&gt;

&lt;p&gt;On files: Runs the file with the group owner's permissions.&lt;/p&gt;

&lt;p&gt;On directories: Ensures all new files/subdirectories inherit the group of the parent directory—not the user’s default group.&lt;/p&gt;

&lt;p&gt;Use Case:&lt;br&gt;
In a shared group directory like /project, you want every file created to belong to the same group.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;chmod g+s /project
ls -ld /project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;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;drwxr-sr-x 2 devs devs 4096 Apr 23 09:32 /project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;strong&gt;s&lt;/strong&gt; in the group execute position means SGID is active.&lt;/p&gt;

&lt;p&gt;&lt;a id="3-sticky-bit"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Sticky Bit
&lt;/h2&gt;

&lt;p&gt;Used only on directories, the Sticky Bit prevents users from deleting files they don't own—even if they have write access to the directory.&lt;/p&gt;

&lt;p&gt;Use Case:&lt;br&gt;
On shared directories like /tmp, you don’t want users accidentally or maliciously deleting others’ files.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;chmod o+t /tmp
ls -ld /tmp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;drwxrwxrwt 10 root root 4096 Apr 23 09:32 /tmp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;strong&gt;t&lt;/strong&gt; at the end? That’s the Sticky Bit.&lt;/p&gt;

&lt;p&gt;&lt;a id="special-permissions-numeric-mode"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Special Permissions: Numeric Mode
&lt;/h2&gt;

&lt;p&gt;You can set SUID, SGID, and Sticky Bit using numeric values:&lt;/p&gt;

&lt;p&gt;SUID = 4&lt;/p&gt;

&lt;p&gt;SGID = 2&lt;/p&gt;

&lt;p&gt;Sticky Bit = 1&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 plaintext"&gt;&lt;code&gt;chmod 6755 script.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;6 (4 + 2) = SUID + SGID&lt;/p&gt;

&lt;p&gt;755 = Regular permissions&lt;/p&gt;

&lt;p&gt;&lt;a id="Conclusion"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Special permissions in Linux provide fine-grained control for shared environments and collaborative workflows. They're vital tools for sysadmins and DevOps engineers.&lt;/p&gt;

&lt;p&gt;But—use with caution. Setting SUID or SGID on sensitive files can expose your system to security risks if misconfigured.&lt;/p&gt;

&lt;p&gt;Keep your permissions smart, not sloppy.&lt;/p&gt;

&lt;p&gt;&lt;a id="Let's Connect on LinkedIn"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Let’s connect on LinkedIn
&lt;/h2&gt;

&lt;p&gt;(&lt;a href="https://www.linkedin.com/in/chiamaka-chielo?utm_source=share&amp;amp;utm_campaign=share_via&amp;amp;utm_content=profile&amp;amp;utm_medium=android_app" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/chiamaka-chielo?utm_source=share&amp;amp;utm_campaign=share_via&amp;amp;utm_content=profile&amp;amp;utm_medium=android_app&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;As I automate my journey into RHCE and Ansible, I’d love to connect with fellow learners and professionals. Feel free to reach out and join me as I share tips, resources, and insights throughout this 30-day challenge.&lt;/p&gt;

&lt;h1&gt;
  
  
  cloudwhistler #30daysLinuxchallenge
&lt;/h1&gt;

&lt;h1&gt;
  
  
  Linux #ACL #FilePermissions #CloudWhistler #30DaysLinux
&lt;/h1&gt;

</description>
      <category>cloudwhistler</category>
      <category>redhat</category>
      <category>devops</category>
      <category>linux</category>
    </item>
    <item>
      <title>A Simple Guide to ACLs in Linux</title>
      <dc:creator>Chielo Chiamaka </dc:creator>
      <pubDate>Mon, 21 Apr 2025 09:08:59 +0000</pubDate>
      <link>https://dev.to/chielo_chiamaka/a-simple-guide-to-acls-in-linux-pd3</link>
      <guid>https://dev.to/chielo_chiamaka/a-simple-guide-to-acls-in-linux-pd3</guid>
      <description>&lt;p&gt;In Linux, traditional file permissions (&lt;code&gt;rwxrwxrwx&lt;/code&gt;) work fine for basic access control. But if you need to give &lt;strong&gt;specific users or groups&lt;/strong&gt; access to a file &lt;em&gt;without changing its ownership or group&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That’s where &lt;strong&gt;ACL (Access Control List)&lt;/strong&gt; comes in.  &lt;/p&gt;

&lt;p&gt;It gives you more granular permission control, beyond just owner, group, and others.&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Why Use ACL?&lt;/li&gt;
&lt;li&gt;1. Check ACL Permissions&lt;/li&gt;
&lt;li&gt;2. Add User-Specific ACL Permission&lt;/li&gt;
&lt;li&gt;3. Remove ACL Permission for a User&lt;/li&gt;
&lt;li&gt;4. Remove All ACL Permissions&lt;/li&gt;
&lt;li&gt;5. Set ACL for a Group&lt;/li&gt;
&lt;li&gt;Understanding the Mask&lt;/li&gt;
&lt;li&gt;How to Know If a File Has ACL&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;li&gt;Let's Connect on LinkedIn&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a id="Why Use ACL?"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Use ACL?
&lt;/h2&gt;

&lt;p&gt;Let's assume in your organisation,&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A file is owned by &lt;strong&gt;user &lt;code&gt;chielo&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;group &lt;code&gt;devs&lt;/code&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;You want to give &lt;strong&gt;&lt;code&gt;sophy&lt;/code&gt; read-only access&lt;/strong&gt;, but without changing the file's group or ownership.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Traditional permissions can’t do this.&lt;/strong&gt;  &lt;strong&gt;ACL can.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a id="1. Check ACL Permissions"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Check ACL Permissions
&lt;/h2&gt;

&lt;p&gt;To view ACL entries:&lt;/p&gt;

&lt;p&gt;getfacl &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjyvqjznog5zgfputo19a.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjyvqjznog5zgfputo19a.jpg" alt="Check ACL Permission" width="800" height="252"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;h1&gt;
  
  
  file: secteam
&lt;/h1&gt;

&lt;h1&gt;
  
  
  owner: root
&lt;/h1&gt;

&lt;h1&gt;
  
  
  group: root
&lt;/h1&gt;

&lt;p&gt;user::rwx&lt;br&gt;
group::r-x&lt;br&gt;
other::r-x&lt;/p&gt;

&lt;p&gt;&lt;a id="2. Add User-Specific ACL Permission"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Add User-Specific ACL Permission
&lt;/h2&gt;

&lt;p&gt;To give a specific user access:&lt;br&gt;
setfacl -m u:: directory &lt;/p&gt;

&lt;p&gt;Explanation:&lt;br&gt;
-m = modify&lt;br&gt;
u:grape:rx = give user grape read &amp;amp; execute permission&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe1ai7o27ku11uyfc6ysz.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe1ai7o27ku11uyfc6ysz.jpg" alt="Add user specific ACL Permission" width="800" height="186"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;ACL output:&lt;/p&gt;

&lt;h1&gt;
  
  
  file: secteam
&lt;/h1&gt;

&lt;h1&gt;
  
  
  owner: root
&lt;/h1&gt;

&lt;h1&gt;
  
  
  group: root
&lt;/h1&gt;

&lt;p&gt;user::rwx ( The file owner)&lt;br&gt;
user:grape:rx ( ACL permission for user 'grape')&lt;br&gt;
group::r-x ( group has read and execute permission)&lt;br&gt;
other::r-x  ( Others have read and execute permission)&lt;/p&gt;

&lt;p&gt;&lt;a id="3. Remove ACL Permission for a User"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Remove ACL Permission for a User
&lt;/h2&gt;

&lt;p&gt;To remove a specific user's ACL entry:&lt;br&gt;
setfacl -x u: file.txt&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0w36fjucq2ctkgdfdh2o.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0w36fjucq2ctkgdfdh2o.jpg" alt="Remove ACL Permission for a user" width="800" height="182"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Updated ACL output:&lt;/p&gt;

&lt;h1&gt;
  
  
  file: secteam
&lt;/h1&gt;

&lt;h1&gt;
  
  
  owner: root
&lt;/h1&gt;

&lt;h1&gt;
  
  
  group: root
&lt;/h1&gt;

&lt;p&gt;user::rwx&lt;br&gt;
group::r-x&lt;br&gt;
other::r-x&lt;/p&gt;

&lt;p&gt;&lt;a id="4. Remove All ACL Permissions "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Remove All ACL Permissions
&lt;/h2&gt;

&lt;p&gt;To clear all ACL entries (except standard permissions):&lt;br&gt;
setfacl -b file.txt&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8te5i0st4ja9er6bxpqv.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8te5i0st4ja9er6bxpqv.jpg" alt="Remove all ACL permissions" width="800" height="191"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;-b = remove all ACL entries&lt;/p&gt;

&lt;p&gt;&lt;a id="5. Set ACL for a Group"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Set ACL for a Group
&lt;/h2&gt;

&lt;p&gt;To give a group specific permissions:&lt;br&gt;
setfacl -m g:: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffmj4w5lfeebcvww7oik3.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffmj4w5lfeebcvww7oik3.jpg" alt="Set ACL for a group" width="800" height="191"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This gives read-only access to the entire systemadmin group.&lt;/p&gt;

&lt;p&gt;&lt;a id="Understanding the Mask"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding the Mask
&lt;/h2&gt;

&lt;p&gt;The mask defines the maximum permission that can be granted to users (except the owner) and groups via ACL.&lt;br&gt;
Even if you set:&lt;br&gt;
setfacl -m u:chielo:rw file.txt&lt;/p&gt;

&lt;p&gt;If the mask is:&lt;br&gt;
mask::r--&lt;/p&gt;

&lt;p&gt;Then chielo will only have read access.&lt;br&gt;
To update the mask:&lt;br&gt;
setfacl -m mask:rw file.txt&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F067n2u9wcynoaw6m1ksm.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F067n2u9wcynoaw6m1ksm.jpg" alt="mask" width="800" height="349"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a id="How to Know If a File Has ACL"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Know If a File Has ACL
&lt;/h2&gt;

&lt;p&gt;Run:&lt;br&gt;
ls -l&lt;/p&gt;

&lt;p&gt;If you see a + sign at the end of the permission string:&lt;br&gt;
-rw-r--r--+ 1 chielo devs 1024 Apr 15 file.txt&lt;/p&gt;

&lt;p&gt;It means the file has ACLs applied.&lt;/p&gt;

&lt;p&gt;&lt;a id="Conclusion"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;ACLs are incredibly useful when you're managing permissions for multiple users or groups without disrupting existing setups.&lt;/p&gt;

&lt;p&gt;Try experimenting with setfacl and getfacl on your test files and see the difference for yourself.&lt;/p&gt;

&lt;p&gt;&lt;a id="Let's Connect on LinkedIn"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Let’s connect on LinkedIn
&lt;/h2&gt;

&lt;p&gt;(&lt;a href="https://www.linkedin.com/in/chiamaka-chielo?utm_source=share&amp;amp;utm_campaign=share_via&amp;amp;utm_content=profile&amp;amp;utm_medium=android_app" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/chiamaka-chielo?utm_source=share&amp;amp;utm_campaign=share_via&amp;amp;utm_content=profile&amp;amp;utm_medium=android_app&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;As I automate my journey into RHCE and Ansible, I’d love to connect with fellow learners and professionals. Feel free to reach out and join me as I share tips, resources, and insights throughout this 30-day challenge.&lt;/p&gt;

&lt;h1&gt;
  
  
  cloudwhistler #30daysLinuxchallenge
&lt;/h1&gt;

&lt;h1&gt;
  
  
  Linux #ACL #FilePermissions #CloudWhistler #30DaysLinux
&lt;/h1&gt;

</description>
      <category>cloudwhistler</category>
      <category>linux</category>
      <category>opensource</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
