<?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: Alex Enson</title>
    <description>The latest articles on DEV Community by Alex Enson (@alexenson).</description>
    <link>https://dev.to/alexenson</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%2F3020493%2F81be8296-12c7-4e0a-8f51-9ce597b8b528.jpg</url>
      <title>DEV Community: Alex Enson</title>
      <link>https://dev.to/alexenson</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/alexenson"/>
    <language>en</language>
    <item>
      <title>Scripting Series – Part 8 of 8</title>
      <dc:creator>Alex Enson</dc:creator>
      <pubDate>Tue, 06 May 2025 12:24:24 +0000</pubDate>
      <link>https://dev.to/alexenson/scripting-series-part-8-of-8-p22</link>
      <guid>https://dev.to/alexenson/scripting-series-part-8-of-8-p22</guid>
      <description>&lt;p&gt;In the final part of the scripting series, we will be a looking at a real world example of a system health script you can run in your production environment.&lt;/p&gt;

&lt;p&gt;This type of script is a powerful tool for both new and seasoned Linux users, offering a quick and automated snapshot of a system's health. It combines key administrative tasks - like checking uptime, disk usage, system load, user activity, and log data - into a single, readable report. Whether you're a student learning Bash, a sysadmin managing servers, or a DevOps engineer monitoring resources, this script saves time, reduces manual effort, and builds a habit of proactive system checks. It’s not just a script - it’s a hands-on learning experience and a real-world productivity booster.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create the script in VIM.&lt;/strong&gt;&lt;br&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%2Fpiggw7igjirvfxboy93v.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%2Fpiggw7igjirvfxboy93v.png" alt="Image description" width="516" height="26"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Write the script in VIM and save it.&lt;/strong&gt;&lt;br&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%2Fdcbvhc88ycda2p7iv2oo.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%2Fdcbvhc88ycda2p7iv2oo.png" alt="Image description" width="800" height="662"&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%2Fe9thjn4oq6yvhpmztrn1.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%2Fe9thjn4oq6yvhpmztrn1.png" alt="Image description" width="742" height="669"&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%2Fs8mmg02qhsr7bumxze86.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%2Fs8mmg02qhsr7bumxze86.png" alt="Image description" width="776" height="611"&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%2Fhi1w8j6h3639yuwwaz33.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%2Fhi1w8j6h3639yuwwaz33.png" alt="Image description" width="753" height="612"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Save the script.&lt;/strong&gt;&lt;br&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%2Fy9ju1vpcwbnmpksn8wws.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%2Fy9ju1vpcwbnmpksn8wws.png" alt="Image description" width="144" height="56"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;br&gt;
The tee command in Linux is used to read from standard input and write to both standard output and one or more files simultaneously. It's especially useful when you want to see the output of a command on the screen but also save it to a file.&lt;/p&gt;

&lt;p&gt;This is a well-organized Bash script designed to generate a system health report and log it to a timestamped file. Below is a breakdown of the script section by section, along with explanations of the commands and their purposes.&lt;br&gt;
&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Description of what is happening in the script:&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;&lt;br&gt;
🧾 &lt;strong&gt;1. Define Variables&lt;/strong&gt;&lt;br&gt;
LOG_DIR="$HOME/sys_logs"&lt;br&gt;
DATE_STR=$(date +%F_%H-%M-%S)&lt;br&gt;
LOG_FILE="$LOG_DIR/report_$DATE_STR.log"&lt;br&gt;
HOSTNAME=$(hostname)&lt;br&gt;
CURRENT_USER=$(whoami)&lt;br&gt;
• LOG_DIR: Sets the directory where logs will be stored.&lt;br&gt;
• DATE_STR: Gets current date and time in YYYY-MM-DD_HH-MM-SS format.&lt;br&gt;
• LOG_FILE: Constructs the full path of the log file.&lt;br&gt;
• HOSTNAME, CURRENT_USER: Capture system hostname and the user running the script.&lt;/p&gt;




&lt;p&gt;📁 &lt;strong&gt;2. Prepare Directory and Log File&lt;/strong&gt;&lt;br&gt;
mkdir -p "$LOG_DIR"&lt;br&gt;
touch "$LOG_FILE"&lt;br&gt;
• Ensures the log directory exists, and creates an empty log file.&lt;/p&gt;




&lt;p&gt;🖥 &lt;strong&gt;3. System Info&lt;/strong&gt;&lt;br&gt;
Prints basic system information like:&lt;br&gt;
• Current user&lt;br&gt;
• Hostname&lt;br&gt;
• Home directory&lt;br&gt;
• Default shell&lt;br&gt;
• Current $PATH&lt;br&gt;
All outputs are shown on-screen and saved to the log file using tee -a.&lt;/p&gt;




&lt;p&gt;⏳ &lt;strong&gt;4. System Uptime&lt;/strong&gt;&lt;br&gt;
uptime -p | tee -a "$LOG_FILE"&lt;br&gt;
• Shows how long the system has been running in human-readable form.&lt;/p&gt;




&lt;p&gt;💾 &lt;strong&gt;5. Disk Usage&lt;/strong&gt;&lt;br&gt;
df -h | grep -v tmpfs | tee -a "$LOG_FILE"&lt;br&gt;
• Displays disk usage excluding tmpfs (temporary filesystems).&lt;/p&gt;




&lt;p&gt;📂 &lt;strong&gt;6. Top 5 Largest Directories in /&lt;/strong&gt;&lt;br&gt;
du -ah / 2&amp;gt;/dev/null | sort -rh | head -n 5 &amp;gt; /tmp/top_dirs.tmp&lt;br&gt;
cat /tmp/top_dirs.tmp | tee -a "$LOG_FILE"&lt;br&gt;
• Lists the 5 largest files/directories starting from root.&lt;br&gt;
• Redirects errors (e.g. permission denied) to /dev/null.&lt;/p&gt;




&lt;p&gt;👥 &lt;strong&gt;7. Math with expr (User Count)&lt;/strong&gt;&lt;br&gt;
total_users=$(who | wc -l)&lt;br&gt;
users_plus_five=$(expr $total_users + 5)&lt;br&gt;
• Counts logged-in users.&lt;br&gt;
• Adds 5 to that count using expr.&lt;/p&gt;




&lt;p&gt;🔢** 8. Math with (( )) (Log Files Count)**&lt;br&gt;
log_count=$(ls -1 /var/log | wc -l)&lt;br&gt;
log_times_three=$(( log_count * 3 ))&lt;br&gt;
• Counts how many files are in /var/log.&lt;br&gt;
• Multiplies that count by 3 using arithmetic expansion.&lt;/p&gt;




&lt;p&gt;🧮 &lt;strong&gt;9. Floating-point Math with bc (Load Average)&lt;/strong&gt;&lt;br&gt;
load_string=$(cat /proc/loadavg)&lt;br&gt;
load1=$(echo "$load_string" | cut -d ' ' -f1)&lt;br&gt;
load5=$(echo "$load_string" | cut -d ' ' -f2)&lt;br&gt;
avg_load=$(echo "scale=2; ($load1 + $load5)/2" | bc)&lt;br&gt;
• Gets CPU load averages (1 and 5 minute).&lt;br&gt;
• Calculates their average using bc, which handles floating-point math.&lt;/p&gt;




&lt;p&gt;✅ &lt;strong&gt;10. Exit Status Check&lt;/strong&gt;&lt;br&gt;
ls /etc/passwd &amp;gt; /dev/null&lt;br&gt;
status=$?&lt;br&gt;
• Runs a harmless command and captures its exit status.&lt;br&gt;
• Useful for testing if commands succeed (status 0) or fail (non-zero).&lt;/p&gt;




&lt;p&gt;🏁 &lt;strong&gt;11. Script Exit&lt;/strong&gt;&lt;br&gt;
exit 0&lt;br&gt;
• Clean exit from the script, signaling success.&lt;/p&gt;




&lt;p&gt;✅ &lt;strong&gt;Key Concepts Demonstrated&lt;/strong&gt;&lt;br&gt;
• Variables and string substitution&lt;br&gt;
• Date formatting&lt;br&gt;
• File and directory operations&lt;br&gt;
• Redirection and piping&lt;br&gt;
• Use of tee to log and display output&lt;br&gt;
• Integer and floating-point math&lt;br&gt;
• Process status ($?)&lt;br&gt;
• Basic use of utilities like df, uptime, du, bc&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Apply the necessary permission to the script so it can be executed.&lt;/strong&gt;&lt;br&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%2Fcyo9q6opxqptmdn37mla.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%2Fcyo9q6opxqptmdn37mla.png" alt="Image description" width="548" height="25"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If we do a ls –ltrh we see that the script has been created and also it is in green colour – meaning the permissions have been applied to the script and therefore it is now executable.&lt;/strong&gt;&lt;br&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%2Fuh4513rl8omcaiw09zhu.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%2Fuh4513rl8omcaiw09zhu.png" alt="Image description" width="800" height="390"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Execute the script with ./&lt;/strong&gt;&lt;br&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%2Flj9066nut4huoo16xkso.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%2Flj9066nut4huoo16xkso.png" alt="Image description" width="481" height="33"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Output of the script once it has been executed.&lt;/strong&gt;&lt;br&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%2Fi20l10k9r989slawqm4y.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%2Fi20l10k9r989slawqm4y.png" alt="Image description" width="800" height="862"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Following the execution of the script, a directory has been created with log files.&lt;/strong&gt;&lt;br&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%2Fmgmy5239tjqpjt53qszu.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%2Fmgmy5239tjqpjt53qszu.png" alt="Image description" width="532" height="23"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let’s go into the directory.&lt;/strong&gt;&lt;br&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%2Fow285z75xp7ww6f9skj3.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%2Fow285z75xp7ww6f9skj3.png" alt="Image description" width="359" height="25"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If we do a ls –ltrh and see what is inside the directory.&lt;/strong&gt;&lt;br&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%2Fgshe3r3747njd36j8koi.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%2Fgshe3r3747njd36j8koi.png" alt="Image description" width="359" height="25"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;We can see that a log file has been created following the execution of the script.&lt;/strong&gt;&lt;br&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%2F72kjgm75f1ghx9rctg0o.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%2F72kjgm75f1ghx9rctg0o.png" alt="Image description" width="744" height="125"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If we were to go into the log file with VIM, it basically displays the same information as the output – following the execution of the script.&lt;/strong&gt;&lt;br&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%2Fya1isb57crquxlocfu89.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%2Fya1isb57crquxlocfu89.png" alt="Image description" width="641" height="35"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&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%2F9tidfh770s5xatzcxj8f.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%2F9tidfh770s5xatzcxj8f.png" alt="Image description" width="800" height="664"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;&lt;br&gt;&lt;a href="//www.linkedin.com/in/alex-enson-a6692815a"&gt;Connect with me on LinkedIn&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
#30DaysLinuxChallenge #RedHatEnterpriseLinux&lt;br&gt;
#CloudWhistler  #CloudEngineer  #Linux&lt;br&gt;
#DevOps #RedHat  #OpenSource&lt;br&gt;
#CloudComputing #Automation&lt;br&gt;
&lt;a href="https://dev.toCloudEngineer"&gt;#CloudEngineer&lt;/a&gt; &lt;a href="https://dev.toSysAdmin"&gt;#SysAdmin&lt;/a&gt; &lt;a href="https://dev.toITSecurity"&gt;#ITSecurity&lt;/a&gt; &lt;a href="https://dev.toTechTips"&gt;#TechTips&lt;/a&gt; &lt;a href="https://dev.toBusinessIT"&gt;#BusinessIT&lt;/a&gt; &lt;a href="https://dev.toLeadership"&gt;#Leadership&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>cloudwhistler</category>
      <category>opensource</category>
      <category>devops</category>
      <category>linux</category>
    </item>
    <item>
      <title>Scripting Series – Part 7 of 8</title>
      <dc:creator>Alex Enson</dc:creator>
      <pubDate>Mon, 05 May 2025 11:24:25 +0000</pubDate>
      <link>https://dev.to/alexenson/scripting-series-part-7-of-8-50bp</link>
      <guid>https://dev.to/alexenson/scripting-series-part-7-of-8-50bp</guid>
      <description>&lt;p&gt;Here we will dive into part 7 in the shell scripting series. Today we will be looking at two scripts in order to check whether a particular service is running.&lt;/p&gt;

&lt;p&gt;Shell scripting is essential in production environments for automating repetitive tasks, ensuring consistency, and minimising human error. It enables engineers to streamline deployments, manage system configurations, monitor processes, and orchestrate complex workflows with precision. In a high-availability environment, shell scripts act as reliable, lightweight tools that reduce manual intervention and improve operational efficiency.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  1st Script:
&lt;/h2&gt;

&lt;p&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Create the script in VIM.&lt;/strong&gt;&lt;br&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%2Fhcbgo9dkhdt26rmjor3s.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%2Fhcbgo9dkhdt26rmjor3s.png" alt="Image description" width="800" height="32"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Write the script in VIM and save it.&lt;/strong&gt;&lt;br&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%2Fio2t82zsgxeg6mrrmfq6.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%2Fio2t82zsgxeg6mrrmfq6.png" alt="Image description" width="732" height="754"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;What it does:&lt;/strong&gt;&lt;br&gt;
• ls "$logfile": Tries to list the file whose path is in the variable logfile.&lt;br&gt;
• 2&amp;gt;/dev/null: Suppresses error messages by redirecting stderr (file descriptor 2) to /dev/null.&lt;br&gt;
💡 &lt;strong&gt;In Plain English:&lt;/strong&gt;&lt;br&gt;
“Try to list this file. If it doesn’t exist, don’t show any error message.”&lt;br&gt;
🧠 &lt;strong&gt;Common use in scripts:&lt;/strong&gt;&lt;br&gt;
This is often used to check if a file exists without showing errors. &lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Apply the necessary permissions to the script so it can be executed.&lt;/strong&gt;&lt;br&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%2Fkbx8ax4qplw6j3gb2i5v.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%2Fkbx8ax4qplw6j3gb2i5v.png" alt="Image description" width="800" height="22"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If we do a ls –ltrh we see that the script has been created and also it is in green colour – meaning the permissions have been applied to the script and therefore it is now executable.&lt;/strong&gt;&lt;br&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%2Fr3ltaqvh8kc6un9s82et.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%2Fr3ltaqvh8kc6un9s82et.png" alt="Image description" width="800" height="374"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Execute the script with ./&lt;/strong&gt;&lt;br&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%2Fgrk9zhfs60qu0zs00sib.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%2Fgrk9zhfs60qu0zs00sib.png" alt="Image description" width="798" height="25"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Output of the script once it has been executed. &lt;br&gt;
The script confirms that the SSHD service is running, however there are no logs , so therefore none are displayed.&lt;/strong&gt;&lt;br&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%2F6c9u410vh12bjmwmyjlq.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%2F6c9u410vh12bjmwmyjlq.png" alt="Image description" width="577" height="127"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2nd Script:
&lt;/h2&gt;

&lt;p&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Create the script with VIM.&lt;/strong&gt;&lt;br&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%2Fp52yhhgty6m2z3sr3dwm.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%2Fp52yhhgty6m2z3sr3dwm.png" alt="Image description" width="516" height="34"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Write the script in VIM and save it.&lt;/strong&gt;&lt;br&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%2Fu7faul8gzzj88xjpmpua.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%2Fu7faul8gzzj88xjpmpua.png" alt="Image description" width="572" height="747"&gt;&lt;/a&gt;&lt;br&gt;
The --quiet option in systemctl is-active --quiet means:&lt;br&gt;
Suppress all output — the command returns only an exit status, with no text output.&lt;br&gt;
Here's how it works:&lt;br&gt;
• Exit status 0 → The service is active/running.&lt;br&gt;
• Exit status 1 or other non-zero → The service is inactive, failed, or not found.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Apply the necessary permissions to the script so it can be executed.&lt;/strong&gt;&lt;br&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%2F0ohh6uquf0p7ncj9twvz.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%2F0ohh6uquf0p7ncj9twvz.png" alt="Image description" width="571" height="25"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If we do a ls –ltrh we see that the script has been created and also it is in green colour – meaning the permissions have been applied to the script and therefore it is now executable.&lt;/strong&gt;&lt;br&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%2Ftyxt0gbp5xpaztw0htrp.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%2Ftyxt0gbp5xpaztw0htrp.png" alt="Image description" width="781" height="442"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Execute the script with ./&lt;/strong&gt;&lt;br&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%2Fy9k8x8j3v8615c3po4dc.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%2Fy9k8x8j3v8615c3po4dc.png" alt="Image description" width="484" height="24"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Output of the script once executed.&lt;/strong&gt;&lt;br&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%2Fldma44by9jal1ajkwwr0.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%2Fldma44by9jal1ajkwwr0.png" alt="Image description" width="717" height="445"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  Stay tuned, part 8 in the series coming tomorrow!
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;br&gt;&lt;a href="//www.linkedin.com/in/alex-enson-a6692815a"&gt;Connect with me on LinkedIn&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
#30DaysLinuxChallenge #RedHatEnterpriseLinux&lt;br&gt;
#CloudWhistler  #CloudEngineer  #Linux&lt;br&gt;
#DevOps #RedHat  #OpenSource&lt;br&gt;
#CloudComputing #Automation&lt;br&gt;
&lt;a href="https://dev.toCloudEngineer"&gt;#CloudEngineer&lt;/a&gt; &lt;a href="https://dev.toSysAdmin"&gt;#SysAdmin&lt;/a&gt; &lt;a href="https://dev.toITSecurity"&gt;#ITSecurity&lt;/a&gt; &lt;a href="https://dev.toTechTips"&gt;#TechTips&lt;/a&gt; &lt;a href="https://dev.toBusinessIT"&gt;#BusinessIT&lt;/a&gt; &lt;a href="https://dev.toLeadership"&gt;#Leadership&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>cloudwhistler</category>
      <category>opensource</category>
      <category>devops</category>
      <category>linux</category>
    </item>
    <item>
      <title>Scripting Series – Part 6 of 8</title>
      <dc:creator>Alex Enson</dc:creator>
      <pubDate>Sun, 04 May 2025 12:09:03 +0000</pubDate>
      <link>https://dev.to/alexenson/scripting-series-part-6-of-8-5365</link>
      <guid>https://dev.to/alexenson/scripting-series-part-6-of-8-5365</guid>
      <description>&lt;p&gt;Here we will dive into part 6 in the shell scripting series. Today we will look at how you can use a for loop to iterate through all files in a directory and the function of file comparison.&lt;/p&gt;

&lt;p&gt;Shell scripting is essential in production environments for automating repetitive tasks, ensuring consistency, and minimising human error. It enables engineers to streamline deployments, manage system configurations, monitor processes, and orchestrate complex workflows with precision. In a high-availability environment, shell scripts act as reliable, lightweight tools that reduce manual intervention and improve operational efficiency.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create the script using VIM.&lt;/strong&gt;&lt;br&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%2F0kbnbyng56iex0tj990t.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%2F0kbnbyng56iex0tj990t.png" alt="Image description" width="622" height="33"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Write the script in VIM and save the file.&lt;/strong&gt;&lt;br&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%2Fmrod7gy42i3qsdxm9xak.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%2Fmrod7gy42i3qsdxm9xak.PNG" alt="Image description" width="746" height="813"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&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%2Faej2y48hpi08ip5vut6e.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%2Faej2y48hpi08ip5vut6e.png" alt="Image description" width="800" height="659"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Apply the necessary permissions to the script so it can be executed.&lt;/strong&gt;&lt;br&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%2F1vzvanerf7lvwlmoxy3e.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%2F1vzvanerf7lvwlmoxy3e.png" alt="Image description" width="671" height="26"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If we do a ls –ltrh we see that the script has been created. It has a green colour to it – indicating that it is now executable.&lt;/strong&gt;&lt;br&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%2F3414hnpcffl8keftci2v.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%2F3414hnpcffl8keftci2v.png" alt="Image description" width="784" height="420"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Execute the script using ./&lt;/strong&gt;&lt;br&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%2Fnhrf83xxinvswtl6fyfa.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%2Fnhrf83xxinvswtl6fyfa.png" alt="Image description" width="603" height="26"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The output of the script, after it has been executed.&lt;/strong&gt;&lt;br&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%2Fz3p6lmiz40a9fn7ryas5.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%2Fz3p6lmiz40a9fn7ryas5.png" alt="Image description" width="462" height="677"&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%2Fk55a1xdzas1ndr5pq8qr.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%2Fk55a1xdzas1ndr5pq8qr.png" alt="Image description" width="532" height="742"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Stay tuned, part 7 in the series coming tomorrow!
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;br&gt;&lt;a href="//www.linkedin.com/in/alex-enson-a6692815a"&gt;Connect with me on LinkedIn&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
#30DaysLinuxChallenge #RedHatEnterpriseLinux&lt;br&gt;
#CloudWhistler  #CloudEngineer  #Linux&lt;br&gt;
#DevOps #RedHat  #OpenSource&lt;br&gt;
#CloudComputing #Automation&lt;br&gt;
&lt;a href="https://dev.toCloudEngineer"&gt;#CloudEngineer&lt;/a&gt; &lt;a href="https://dev.toSysAdmin"&gt;#SysAdmin&lt;/a&gt; &lt;a href="https://dev.toITSecurity"&gt;#ITSecurity&lt;/a&gt; &lt;a href="https://dev.toTechTips"&gt;#TechTips&lt;/a&gt; &lt;a href="https://dev.toBusinessIT"&gt;#BusinessIT&lt;/a&gt; &lt;a href="https://dev.toLeadership"&gt;#Leadership&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>cloudwhistler</category>
      <category>opensource</category>
      <category>devops</category>
      <category>linux</category>
    </item>
    <item>
      <title>Scripting Series – Part 5 of 8</title>
      <dc:creator>Alex Enson</dc:creator>
      <pubDate>Sat, 03 May 2025 12:23:22 +0000</pubDate>
      <link>https://dev.to/alexenson/scripting-series-part-5-of-8-59je</link>
      <guid>https://dev.to/alexenson/scripting-series-part-5-of-8-59je</guid>
      <description>&lt;p&gt;Let's continue our shell scripting series in Linux. &lt;/p&gt;

&lt;p&gt;Today we will be looking at the 'Continue'command and the use cases for this command to be used in your script.&lt;/p&gt;

&lt;p&gt;In Linux shell scripting, the continue command is used inside loops (like for, while, or until) to skip the rest of the current iteration and move on to the next one.&lt;/p&gt;

&lt;p&gt;🔁 &lt;strong&gt;How it works:&lt;/strong&gt;&lt;br&gt;
• When continue is hit, the script jumps straight to the next loop cycle, bypassing any remaining commands in the current iteration.&lt;/p&gt;

&lt;p&gt;🔧 &lt;strong&gt;IT Use Case:&lt;/strong&gt; Skipping Certain Files During Batch Processing&lt;br&gt;
Scenario: A system administrator writes a script to scan a directory and apply security patches or audits to all .sh files, but wants to skip any files with the word test in the filename.&lt;br&gt;
&lt;br&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%2Fu5392d4yfbg1hgzdg9r2.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%2Fu5392d4yfbg1hgzdg9r2.PNG" alt="Image description" width="271" height="152"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Benefit:&lt;/strong&gt; This ensures that test scripts are excluded from production-level audits, reducing risk and processing time. It makes the automation cleaner and more intelligent.&lt;/p&gt;

&lt;p&gt;💼 &lt;strong&gt;Business Use Case:&lt;/strong&gt; Processing Customer Records and Skipping Inactive Accounts&lt;br&gt;
Scenario: A business analyst creates a shell script to analyze customer records from a CSV file. The analyst wants to skip rows where the status is inactive.&lt;br&gt;
&lt;br&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%2F0hag5eyj0kab65mjfsel.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%2F0hag5eyj0kab65mjfsel.PNG" alt="Image description" width="318" height="159"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Benefit:&lt;/strong&gt; The script saves time and resources by ignoring irrelevant data, ensuring the analysis focuses only on engaged customers. This improves marketing targeting and ROI calculations.&lt;/p&gt;

&lt;p&gt;The -r option in the read command in Bash stands for "raw", and it prevents backslashes () from being interpreted as escape characters.&lt;/p&gt;

&lt;p&gt;💡 &lt;strong&gt;When to Use -r?&lt;/strong&gt;&lt;br&gt;
Always use -r unless you explicitly want to interpret escape sequences like \n, \t, or \. It's especially important when reading file paths, raw strings, or data from CSV files to avoid unexpected transformations.&lt;br&gt;
&lt;br&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create the script in VIM.&lt;/strong&gt;&lt;br&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%2F8fvlwpigq42jw57fzcxa.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%2F8fvlwpigq42jw57fzcxa.png" alt="Image description" width="601" height="40"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Write the script in VIM and save it.&lt;/strong&gt;&lt;br&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%2Fprkz31dj6e5hfvo6vzu5.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%2Fprkz31dj6e5hfvo6vzu5.png" alt="Image description" width="800" height="698"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&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%2Ftmqplodjg2h7aayp7agv.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%2Ftmqplodjg2h7aayp7agv.PNG" alt="Image description" width="726" height="786"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Apply the necessary permissions, so the script can be executed.&lt;/strong&gt;&lt;br&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%2Fv8k682e1o4z880upxlzt.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%2Fv8k682e1o4z880upxlzt.png" alt="Image description" width="662" height="26"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If we do a ls –ltrh we can confirm that the script has been created and the execute permissions has been applied to it, as it is in green colour.&lt;/strong&gt;&lt;br&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%2Fsk644w5bztf6ld7fkwt5.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%2Fsk644w5bztf6ld7fkwt5.png" alt="Image description" width="800" height="393"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Execute the script with ./&lt;/strong&gt;&lt;br&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%2F8f6t66x2dket4op05ioy.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%2F8f6t66x2dket4op05ioy.png" alt="Image description" width="580" height="36"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Output after executing the script.&lt;/strong&gt;&lt;br&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%2Fjo2rjdk803309pb887y4.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%2Fjo2rjdk803309pb887y4.png" alt="Image description" width="576" height="260"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You can say that only the false statements are displaying, not the true statements.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Stay tuned, part 6 in the series coming tomorrow!
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;br&gt;&lt;a href="//www.linkedin.com/in/alex-enson-a6692815a"&gt;Connect with me on LinkedIn&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
#30DaysLinuxChallenge #RedHatEnterpriseLinux&lt;br&gt;
#CloudWhistler  #CloudEngineer  #Linux&lt;br&gt;
#DevOps #RedHat  #OpenSource&lt;br&gt;
#CloudComputing #Automation&lt;br&gt;
&lt;a href="https://dev.toCloudEngineer"&gt;#CloudEngineer&lt;/a&gt; &lt;a href="https://dev.toSysAdmin"&gt;#SysAdmin&lt;/a&gt; &lt;a href="https://dev.toITSecurity"&gt;#ITSecurity&lt;/a&gt; &lt;a href="https://dev.toTechTips"&gt;#TechTips&lt;/a&gt; &lt;a href="https://dev.toBusinessIT"&gt;#BusinessIT&lt;/a&gt; &lt;a href="https://dev.toLeadership"&gt;#Leadership&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>cloudwhistler</category>
      <category>opensource</category>
      <category>devops</category>
      <category>linux</category>
    </item>
    <item>
      <title>Scripting Series – Part 4 of 8</title>
      <dc:creator>Alex Enson</dc:creator>
      <pubDate>Fri, 02 May 2025 10:48:20 +0000</pubDate>
      <link>https://dev.to/alexenson/scripting-series-part-4-of-7-4727</link>
      <guid>https://dev.to/alexenson/scripting-series-part-4-of-7-4727</guid>
      <description>&lt;p&gt;Welcome to part 4 in the series of shell scripting. Today we will look at a script that goes through an array with complex values. Complex values such as spaces, apostrophes, and quotes.&lt;/p&gt;

&lt;p&gt;Scripting is the process of writing a set of instructions in a programming or scripting language to automate tasks that would otherwise be done manually. In the context of shell scripting, these instructions are written for the command-line shell, allowing users to perform complex operations - like file management, backups, or software installations - with just a single script execution. It's a powerful tool for saving time and ensuring consistency in system administration and development workflows&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create the script in VIM, complex_list.sh&lt;/strong&gt;&lt;br&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%2Fz2pcflqja2uhbok6r549.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%2Fz2pcflqja2uhbok6r549.png" alt="Image description" width="450" height="36"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Write and save the script in VIM.&lt;/strong&gt;&lt;br&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%2F8ytqkmoq858qrrz9jogr.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%2F8ytqkmoq858qrrz9jogr.png" alt="Image description" width="800" height="567"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;We can check whether it has been created  by doing ls -ltrh.&lt;/strong&gt;&lt;br&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%2Fniqsq3aekf61oaqu8wvh.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%2Fniqsq3aekf61oaqu8wvh.png" alt="Image description" width="627" height="52"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Give the permission so the script can be executed.&lt;/strong&gt;&lt;br&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%2F75u0gbjzwof3i4jl7b8n.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%2F75u0gbjzwof3i4jl7b8n.png" alt="Image description" width="501" height="23"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If we then do a ls –ltrh we can see the script has gained a green colour, meaning that it is now executable.&lt;/strong&gt;&lt;br&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%2Fx17q3n1xdqu3v7tqm38b.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%2Fx17q3n1xdqu3v7tqm38b.png" alt="Image description" width="625" height="54"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Output after executing the script by using the command ./&lt;/strong&gt;&lt;br&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%2F0yxhfbsit9kd9pcuitfv.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%2F0yxhfbsit9kd9pcuitfv.png" alt="Image description" width="440" height="194"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Stay tuned, part 5 in the series coming tomorrow!
&lt;/h2&gt;

&lt;p&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;&lt;br&gt;&lt;a href="//www.linkedin.com/in/alex-enson-a6692815a"&gt;Connect with me on LinkedIn&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
#30DaysLinuxChallenge #RedHatEnterpriseLinux&lt;br&gt;
#CloudWhistler  #CloudEngineer  #Linux&lt;br&gt;
#DevOps #RedHat  #OpenSource&lt;br&gt;
#CloudComputing #Automation&lt;br&gt;
&lt;a href="https://dev.toCloudEngineer"&gt;#CloudEngineer&lt;/a&gt; &lt;a href="https://dev.toSysAdmin"&gt;#SysAdmin&lt;/a&gt; &lt;a href="https://dev.toITSecurity"&gt;#ITSecurity&lt;/a&gt; &lt;a href="https://dev.toTechTips"&gt;#TechTips&lt;/a&gt; &lt;a href="https://dev.toBusinessIT"&gt;#BusinessIT&lt;/a&gt; &lt;a href="https://dev.toLeadership"&gt;#Leadership&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>cloudwhistler</category>
      <category>opensource</category>
      <category>devops</category>
      <category>linux</category>
    </item>
    <item>
      <title>Scripting Series – Part 3 of 8</title>
      <dc:creator>Alex Enson</dc:creator>
      <pubDate>Thu, 01 May 2025 10:44:55 +0000</pubDate>
      <link>https://dev.to/alexenson/scripting-series-part-3-of-7-4jjf</link>
      <guid>https://dev.to/alexenson/scripting-series-part-3-of-7-4jjf</guid>
      <description>&lt;p&gt;We will continue our scritpting series - with part 3 in the series.&lt;/p&gt;

&lt;p&gt;Here we will look at a script that breaks out of a for loop.&lt;/p&gt;

&lt;p&gt;Shell scripting in Linux is essential for automating repetitive tasks, streamlining system administration, and boosting productivity. It allows users to create powerful scripts that manage files, schedule backups, monitor system health, and more—all with simple, readable code. This makes shell scripting a key skill for anyone working with Linux.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create the script in Vim.&lt;/strong&gt;&lt;br&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%2F3u4pxylr3qlhlh6wex70.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%2F3u4pxylr3qlhlh6wex70.png" alt="Image description" width="573" height="31"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Write the script and save it.&lt;/strong&gt;&lt;br&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%2F5acp38h2p6cn1jt639gv.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%2F5acp38h2p6cn1jt639gv.png" alt="Image description" width="651" height="994"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Apply the necessary permissions to the script so you can execute it.&lt;/strong&gt;&lt;br&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%2F6685dluqwz6ojt7erloc.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%2F6685dluqwz6ojt7erloc.png" alt="Image description" width="605" height="28"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Execute the script and you will get the output.&lt;/strong&gt;&lt;br&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%2F0up33yfyx0cm6sqopwfb.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%2F0up33yfyx0cm6sqopwfb.png" alt="Image description" width="529" height="171"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Stay tuned, part 4 in the series coming tomorrow!
&lt;/h2&gt;

&lt;p&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;&lt;br&gt;&lt;a href="//www.linkedin.com/in/alex-enson-a6692815a"&gt;Connect with me on LinkedIn&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
#30DaysLinuxChallenge #RedHatEnterpriseLinux&lt;br&gt;
#CloudWhistler  #CloudEngineer  #Linux&lt;br&gt;
#DevOps #RedHat  #OpenSource&lt;br&gt;
#CloudComputing #Automation&lt;br&gt;
&lt;a href="https://dev.toCloudEngineer"&gt;#CloudEngineer&lt;/a&gt; &lt;a href="https://dev.toSysAdmin"&gt;#SysAdmin&lt;/a&gt; &lt;a href="https://dev.toITSecurity"&gt;#ITSecurity&lt;/a&gt; &lt;a href="https://dev.toTechTips"&gt;#TechTips&lt;/a&gt; &lt;a href="https://dev.toBusinessIT"&gt;#BusinessIT&lt;/a&gt; &lt;a href="https://dev.toLeadership"&gt;#Leadership&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>cloudwhistler</category>
      <category>opens</category>
      <category>devops</category>
      <category>linux</category>
    </item>
    <item>
      <title>Scripting Series – Part 2 of 8</title>
      <dc:creator>Alex Enson</dc:creator>
      <pubDate>Wed, 30 Apr 2025 09:41:12 +0000</pubDate>
      <link>https://dev.to/alexenson/scripting-series-part-2-of-7-am9</link>
      <guid>https://dev.to/alexenson/scripting-series-part-2-of-7-am9</guid>
      <description>&lt;p&gt;In the Linux environment, scripting is a fundamental practice that empowers users and administrators to automate repetitive tasks, streamline workflows, and ensure consistency across systems. &lt;/p&gt;

&lt;p&gt;The scripting series continues and today we will look at whether you can run a specific scipt.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Open VIM and name thefile you want to create.&lt;/strong&gt;&lt;br&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%2Fbte1q55xxm0lgtwqjj9o.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%2Fbte1q55xxm0lgtwqjj9o.png" alt="Image description" width="547" height="30"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In VIM write the script and save the file.&lt;/strong&gt;&lt;br&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%2Fcn54ym4kdvobohy7v914.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%2Fcn54ym4kdvobohy7v914.png" alt="Image description" width="780" height="771"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Check whether the script has been created and we can see it has.&lt;/strong&gt;&lt;br&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%2F4zl0gy2u8fb6fl81svuf.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%2F4zl0gy2u8fb6fl81svuf.png" alt="Image description" width="761" height="331"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Give the script the correct permissions so we can execute it.&lt;/strong&gt;&lt;br&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%2Fygaevu1etelg8z8tyaoq.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%2Fygaevu1etelg8z8tyaoq.png" alt="Image description" width="621" height="27"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Run the script.&lt;/strong&gt;&lt;br&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%2F7uyor45i0dc9tqnyqdjw.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%2F7uyor45i0dc9tqnyqdjw.png" alt="Image description" width="531" height="32"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Output, and we see that we are not allowed to run the particular file.&lt;/strong&gt;&lt;br&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%2Ffs4rtoo17zhr6uonzpv1.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%2Ffs4rtoo17zhr6uonzpv1.png" alt="Image description" width="606" height="83"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Stay tuned, part 3 in the series coming tomorrow!
&lt;/h2&gt;

&lt;p&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;&lt;br&gt;&lt;a href="//www.linkedin.com/in/alex-enson-a6692815a"&gt;Connect with me on LinkedIn&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
#30DaysLinuxChallenge #RedHatEnterpriseLinux&lt;br&gt;
#CloudWhistler  #CloudEngineer  #Linux&lt;br&gt;
#DevOps #RedHat  #OpenSource&lt;br&gt;
#CloudComputing #Automation&lt;br&gt;
&lt;a href="https://dev.toCloudEngineer"&gt;#CloudEngineer&lt;/a&gt; &lt;a href="https://dev.toSysAdmin"&gt;#SysAdmin&lt;/a&gt; &lt;a href="https://dev.toITSecurity"&gt;#ITSecurity&lt;/a&gt; &lt;a href="https://dev.toTechTips"&gt;#TechTips&lt;/a&gt; &lt;a href="https://dev.toBusinessIT"&gt;#BusinessIT&lt;/a&gt; &lt;a href="https://dev.toLeadership"&gt;#Leadership&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>cloudwhistler</category>
      <category>opensource</category>
      <category>devops</category>
      <category>linux</category>
    </item>
    <item>
      <title>Scripting Series – Part 1 of 8</title>
      <dc:creator>Alex Enson</dc:creator>
      <pubDate>Tue, 29 Apr 2025 12:48:30 +0000</pubDate>
      <link>https://dev.to/alexenson/scripting-series-part-1-of-7-14ep</link>
      <guid>https://dev.to/alexenson/scripting-series-part-1-of-7-14ep</guid>
      <description>&lt;p&gt;&lt;strong&gt;🔧 Introduction to Linux Scripting: Automate Like a Pro&lt;/strong&gt;&lt;br&gt;
Ever wish your computer could handle repetitive tasks for you-like cleaning up files, backing up data, or monitoring systems? That’s where Linux scripting comes in! With just a few lines of shell script, you can turn manual chores into automated magic.&lt;/p&gt;

&lt;p&gt;Linux scripting uses the Bash shell (or similar) to create simple programs-called shell scripts-that can execute commands, control logic, and interact with files. It’s like giving your terminal a brain and a to-do list!&lt;/p&gt;

&lt;p&gt;Whether you're a system admin, developer, or just someone who wants to save time, Linux scripting is your entryway to working smarter, not harder.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When making a script – the extension has be .sh for shell. So the system recognises that the script contains shell commands that will be executed.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The .sh extension in a script stands for "shell script." It's a convention commonly used for scripts written for Unix-like operating systems (like Linux and macOS) that are intended to be executed by a shell (such as Bash or Zsh). The extension indicates that the file contains shell commands, but it's not mandatory for the script to work. It's mainly used for organization and clarity.&lt;br&gt;
&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Basic While Loop Script&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create the script in Vim.&lt;/strong&gt;&lt;br&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%2Fb4ffa9ha6xqhqusurx7e.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%2Fb4ffa9ha6xqhqusurx7e.png" alt="Image description" width="665" height="344"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If we do a ls –ltrh we see the script has been created.&lt;/strong&gt;&lt;br&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%2Fyx5o3g4fu9sayokylcia.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%2Fyx5o3g4fu9sayokylcia.png" alt="Image description" width="800" height="345"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If we do not give the right permissions to execute the script, then we will get denied.&lt;/strong&gt;&lt;br&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%2Fh4u5116fwl7rxwg3v6j6.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%2Fh4u5116fwl7rxwg3v6j6.png" alt="Image description" width="585" height="131"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In Linux, we give execute permissions to users in order to run a script.&lt;/p&gt;

&lt;p&gt;There are three categories of users who can be given permissions:&lt;br&gt;
Owner (user) – The person who created the file or owns it.&lt;br&gt;
Group – A group of users that share the same permissions.&lt;br&gt;
Others – Everyone else who is not the owner or in the group. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;br&gt;
To execute the script we have to use ./ then the name of the script&lt;br&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%2F5141b4qx3g5u2sf3dvdb.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%2F5141b4qx3g5u2sf3dvdb.png" alt="Image description" width="496" height="304"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To run a script on Linux, you typically need to give it execute permissions. This can be done using the chmod command.&lt;br&gt;
Here’s how you can do it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open your terminal.&lt;/li&gt;
&lt;li&gt;Navigate to the directory where the script is located.&lt;/li&gt;
&lt;li&gt;Run the following command to give the script execute permissions:
chmod +x script_name.sh&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;OR&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;chmod 755 (name of the script)&lt;br&gt;
You can also use chmod +x to grant execute permissions without specifying numeric values like 755. The command chmod +x simply adds execute permission to the script for the user.&lt;br&gt;
However, if you want to give the script read, write, and execute permissions to the owner and only execute permissions to others, then chmod 755 would be appropriate. But since you're asking to avoid that, chmod +x is the simpler and more common choice.&lt;br&gt;&lt;br&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Stay tuned, part 2 in the series coming tomorrow!
&lt;/h2&gt;

&lt;p&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;&lt;br&gt;&lt;a href="//www.linkedin.com/in/alex-enson-a6692815a"&gt;Connect with me on LinkedIn&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
#30DaysLinuxChallenge #RedHatEnterpriseLinux&lt;br&gt;
#CloudWhistler  #CloudEngineer  #Linux&lt;br&gt;
#DevOps #RedHat  #OpenSource&lt;br&gt;
#CloudComputing #Automation&lt;br&gt;
&lt;a href="https://dev.toCloudEngineer"&gt;#CloudEngineer&lt;/a&gt; &lt;a href="https://dev.toSysAdmin"&gt;#SysAdmin&lt;/a&gt; &lt;a href="https://dev.toITSecurity"&gt;#ITSecurity&lt;/a&gt; &lt;a href="https://dev.toTechTips"&gt;#TechTips&lt;/a&gt; &lt;a href="https://dev.toBusinessIT"&gt;#BusinessIT&lt;/a&gt; &lt;a href="https://dev.toLeadership"&gt;#Leadership&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>cloudwhistler</category>
      <category>opensource</category>
      <category>devops</category>
      <category>linux</category>
    </item>
    <item>
      <title>Linux Boot Process</title>
      <dc:creator>Alex Enson</dc:creator>
      <pubDate>Mon, 28 Apr 2025 13:07:04 +0000</pubDate>
      <link>https://dev.to/alexenson/linux-boot-process-ff7</link>
      <guid>https://dev.to/alexenson/linux-boot-process-ff7</guid>
      <description>&lt;p&gt;🖥️ Understanding the Linux Boot Process: From Power-On to Desktop.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Have you ever wondered what really happens the moment you press the power button on your Linux machine?&lt;br&gt;
Behind the scenes, a fascinating journey unfolds — a series of well-orchestrated steps that bring your system to life.&lt;br&gt;
Whether you're an IT pro, a business leader, or just a tech enthusiast, understanding the Linux booting process can give you powerful insights into system security, performance, and troubleshooting.&lt;br&gt;
Let’s dive into the magic that happens in those precious few seconds! 🚀&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Index
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1.What is UEFI?&lt;br&gt;
2.The Role of POST (Power-On Self-Test)&lt;br&gt;
3.BIOS vs UEFI Booting&lt;br&gt;
4.The Role of LILO (Linux Loader)&lt;br&gt;
5.How systemd Powers Up Your System&lt;br&gt;
6.Real-world Use Cases (IT and Business)&lt;br&gt;
7.Summary&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;a id="what-is-uefi"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  1.What is UEFI?
&lt;/h2&gt;

&lt;p&gt;UEFI stands for Unified Extensible Firmware Interface — the new superstar replacing traditional BIOS.&lt;br&gt;
It offers faster boot times, stronger security (hello, Secure Boot! 🔒), and a more modern interface for system management.&lt;br&gt;
Fun fact: Thanks to UEFI, your computer can boot in seconds instead of minutes!&lt;br&gt;
&lt;br&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%2Ft65hakl20ylzguy1gdub.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%2Ft65hakl20ylzguy1gdub.png" alt="Image description" width="463" height="468"&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%2F3bgng9mc5zyk8phq6rml.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%2F3bgng9mc5zyk8phq6rml.png" alt="Image description" width="800" height="557"&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%2Fctfk30aqbwyhm92c4fi5.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%2Fctfk30aqbwyhm92c4fi5.png" alt="Image description" width="180" height="386"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a id="the-role-of-post-power-on-self-test"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. The Role of POST (Power-On Self-Test)
&lt;/h2&gt;

&lt;p&gt;POST is your system’s first line of defense.&lt;br&gt;
When you power on your machine, POST quickly checks if your hardware — like RAM, keyboard, or hard drives — is functioning properly.&lt;br&gt;
👉 If POST finds a problem, it will display an error message on your screen — saving you from deeper troubleshooting nightmares.&lt;br&gt;
&lt;br&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%2Frdi863w5v4ilekpeap79.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%2Frdi863w5v4ilekpeap79.png" alt="Image description" width="791" height="533"&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%2Fytshei2xp7u4kdnxx5dl.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%2Fytshei2xp7u4kdnxx5dl.png" alt="Image description" width="619" height="626"&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%2F2gbqhm9tdqxksg7ix8lt.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%2F2gbqhm9tdqxksg7ix8lt.png" alt="Image description" width="711" height="416"&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%2Fn4v7svvpfjtn0zm7fspg.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%2Fn4v7svvpfjtn0zm7fspg.png" alt="Image description" width="800" height="357"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a id="bios-vs-uefi-booting"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. BIOS vs UEFI Booting
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;• BIOS Booting:&lt;/strong&gt;&lt;br&gt;
The bootloader (the little program that starts the OS) lives in the Master Boot Record (MBR) — the very first sector of your hard drive.&lt;br&gt;
&lt;strong&gt;• UEFI Booting:&lt;/strong&gt;&lt;br&gt;
A more modern approach where bootloaders live in a special area called the EFI System Partition.&lt;br&gt;
UEFI also supports larger drives and faster startup.&lt;br&gt;
Customization Tip: UEFI settings are flexible and can be customized to your preferences — such as boot order or enabling/disabling Secure Boot.&lt;br&gt;
&lt;br&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%2Fei09irmv7jzel6fkp299.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%2Fei09irmv7jzel6fkp299.png" alt="Image description" width="794" height="406"&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%2Fr2e9ac2dwgmqs31y8gpq.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%2Fr2e9ac2dwgmqs31y8gpq.png" alt="Image description" width="800" height="285"&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%2Fb959h3ffpbn5okbjqrjw.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%2Fb959h3ffpbn5okbjqrjw.png" alt="Image description" width="569" height="233"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a id="the-role-of-lilo-linux-loader"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. The Role of LILO (Linux Loader)
&lt;/h2&gt;

&lt;p&gt;LILO stands for Linux Loader — a classic bootloader from the early Linux days.&lt;br&gt;
While it's less commonly used today (GRUB is more popular), LILO paved the way for flexible, multi-OS booting options.&lt;br&gt;
&lt;br&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%2Fswdlu8zxc3uchbwdli4u.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%2Fswdlu8zxc3uchbwdli4u.png" alt="Image description" width="728" height="585"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a id="how-systemd-powers-up-your-system"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  5. How systemd Powers Up Your System
&lt;/h2&gt;

&lt;p&gt;Once your kernel starts, systemd takes over.&lt;br&gt;
It’s like the conductor of a tech orchestra, handling:&lt;br&gt;
• Power management 🎛️ (like sound and battery controls)&lt;br&gt;
• User authentication and logins 🧑💻&lt;br&gt;
• Starting your desktop environment (GNOME, KDE, etc.)&lt;br&gt;
Without systemd, your system wouldn’t know how to "wake up" into a usable, graphical world.&lt;br&gt;
&lt;br&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%2F112x9p37tzpzihyg7o04.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%2F112x9p37tzpzihyg7o04.png" alt="Image description" width="738" height="503"&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%2Fs4flsqfevoqdaoc5csiu.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%2Fs4flsqfevoqdaoc5csiu.png" alt="Image description" width="800" height="373"&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%2F9fiz9ycebozuhj0hwozi.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%2F9fiz9ycebozuhj0hwozi.png" alt="Image description" width="673" height="453"&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%2Fm4mt1va588yunj692d2a.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%2Fm4mt1va588yunj692d2a.png" alt="Image description" width="800" height="319"&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%2Ftnapuyvhbotw7lcnilu7.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%2Ftnapuyvhbotw7lcnilu7.png" alt="Image description" width="800" height="359"&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%2Fvamqu0b7uqmryq8n2qro.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%2Fvamqu0b7uqmryq8n2qro.png" alt="Image description" width="528" height="277"&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%2Fbqv2zcj4s62ky6znw5lz.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%2Fbqv2zcj4s62ky6znw5lz.png" alt="Image description" width="742" height="173"&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%2Fsklmecqk0h4h5wbewk1k.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%2Fsklmecqk0h4h5wbewk1k.png" alt="Image description" width="781" height="434"&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%2Fasm1rltqv0k856692zvv.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%2Fasm1rltqv0k856692zvv.png" alt="Image description" width="800" height="190"&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%2Fg07e5vvpnepfwlmx2od4.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%2Fg07e5vvpnepfwlmx2od4.png" alt="Image description" width="799" height="493"&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%2Fjw4b8m24dihpay4fpahu.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%2Fjw4b8m24dihpay4fpahu.png" alt="Image description" width="786" height="514"&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%2F85pm6zqfdn78mj30fj89.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%2F85pm6zqfdn78mj30fj89.png" alt="Image description" width="615" height="218"&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%2Fauzegnvpmj0tzm6hha7f.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%2Fauzegnvpmj0tzm6hha7f.png" alt="Image description" width="469" height="287"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a id="real-world-use-cases-it-and-business"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Real-world Use Cases (IT and Business)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;IT Perspective:&lt;/strong&gt;&lt;br&gt;
• Knowing how boot works helps with faster troubleshooting (e.g., diagnosing hardware failures or bootloader corruption).&lt;br&gt;
• Mastery over UEFI/BIOS settings is critical when deploying new machines in enterprise environments.&lt;br&gt;
&lt;strong&gt;Business Perspective:&lt;/strong&gt;&lt;br&gt;
• Faster, more secure booting means less downtime, better device security, and a smoother user experience for employees.&lt;br&gt;
• With Secure Boot via UEFI, businesses strengthen their defense against malware that tries to tamper with the boot process.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

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

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

&lt;p&gt;The Linux booting process — from POST checks to systemd orchestration — is a beautiful choreography of software and hardware working in perfect harmony.&lt;br&gt;
Understanding these steps doesn’t just make you a smarter IT professional — it empowers you to make better decisions around system design, security, and performance.&lt;br&gt;
The next time you boot your machine, you’ll know exactly what's happening under the hood.&lt;br&gt;
Pretty cool, right? 🚀&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%2Fzk3ve5h9xdk90x1yh4qf.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%2Fzk3ve5h9xdk90x1yh4qf.png" alt="Image description" width="800" height="391"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Stay tuned for more upcoming content!&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;&lt;br&gt;&lt;br&gt;&lt;a href="//www.linkedin.com/in/alex-enson-a6692815a"&gt;Connect with me on LinkedIn&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
#30DaysLinuxChallenge #RedHatEnterpriseLinux&lt;br&gt;
#CloudWhistler  #CloudEngineer  #Linux&lt;br&gt;
#DevOps #RedHat  #OpenSource&lt;br&gt;
#CloudComputing #Automation&lt;br&gt;
&lt;a href="https://dev.toCloudEngineer"&gt;#CloudEngineer&lt;/a&gt; &lt;a href="https://dev.toSysAdmin"&gt;#SysAdmin&lt;/a&gt; &lt;a href="https://dev.toITSecurity"&gt;#ITSecurity&lt;/a&gt; &lt;a href="https://dev.toTechTips"&gt;#TechTips&lt;/a&gt; &lt;a href="https://dev.toBusinessIT"&gt;#BusinessIT&lt;/a&gt; &lt;a href="https://dev.toLeadership"&gt;#Leadership&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>cloudwhistler</category>
      <category>opensource</category>
      <category>devops</category>
      <category>linux</category>
    </item>
    <item>
      <title>How to Reset the Root Password on Linux (Safely and Easily)</title>
      <dc:creator>Alex Enson</dc:creator>
      <pubDate>Sun, 27 Apr 2025 15:02:34 +0000</pubDate>
      <link>https://dev.to/alexenson/how-to-reset-the-root-password-on-linux-safely-and-easily-44oi</link>
      <guid>https://dev.to/alexenson/how-to-reset-the-root-password-on-linux-safely-and-easily-44oi</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;When you lose your root password, it can feel like being locked out of your own digital home. Don't worry—I'm here to guide you through the most practical methods to reset your root password safely. We'll cover multiple approaches, and I'll highlight real IT and business scenarios where each method shines!&lt;br&gt;&lt;/p&gt;

&lt;p&gt;Important First Step: Before trying any of these methods, take a snapshot or backup of your system. If anything goes wrong, you’ll be grateful you did! Here's a helpful video that shows you how: &lt;strong&gt;&lt;a href="https://www.youtube.com/watch?v=rBtTwnJYPRA" rel="noopener noreferrer"&gt;How to take a snapshot on Oracle VM.&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Index
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;• Method 1: Quick Edit at Boot (Easy Mode)&lt;br&gt;
• Method 2: Remount Filesystem as Read/Write&lt;br&gt;
• Method 3: Use the End Key Trick&lt;br&gt;
• Method 4: SELinux Considerations&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;a id="quick-edit-at-boot-easy-mode"&gt;&lt;/a&gt; &lt;br&gt;
&lt;strong&gt;Method 1: Quick Edit at Boot (Easy Mode)&lt;/strong&gt;&lt;br&gt;
Steps:&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%2Fux7gz4asrpqs7h7mnrqn.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%2Fux7gz4asrpqs7h7mnrqn.png" alt="Image description" width="505" height="294"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;1.&lt;/strong&gt;Reboot your system.&lt;br&gt;
&lt;strong&gt;2.&lt;/strong&gt;As soon as it starts booting, press e to edit the boot parameters.&lt;br&gt;
&lt;strong&gt;3.&lt;/strong&gt;Find the line starting with linux or linux16.&lt;br&gt;
&lt;strong&gt;4.&lt;/strong&gt;At the end of the line, add 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;init=/bin/bash
&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%2Fvvij8xhq830k362bzfm6.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%2Fvvij8xhq830k362bzfm6.png" alt="Image description" width="800" height="289"&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%2Fv2fnlp8zc9mu11vwbviz.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%2Fv2fnlp8zc9mu11vwbviz.png" alt="Image description" width="772" height="389"&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%2Ff5q8gu0q3yrh3vy5obe3.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%2Ff5q8gu0q3yrh3vy5obe3.png" alt="Image description" width="443" height="120"&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%2Fdn4p851minwpxobll786.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%2Fdn4p851minwpxobll786.png" alt="Image description" width="514" height="176"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5.&lt;/strong&gt;Press Ctrl + X to boot.&lt;br&gt;
&lt;strong&gt;6.&lt;/strong&gt;You'll now have root access in single-user mode.&lt;br&gt;
&lt;strong&gt;7.&lt;/strong&gt;Set a new root password with:&lt;br&gt;
passwd&lt;br&gt;
&lt;strong&gt;8.&lt;/strong&gt;Reboot the system.&lt;br&gt;
&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Use Case:&lt;/strong&gt;&lt;br&gt;
• IT Admins needing a fast recovery during scheduled maintenance.&lt;br&gt;
• Business: Quick password resets with minimal downtime in non-production environments.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;a id="remount-filesystem-as-read-write"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Method 2: Remount Filesystem as Read/Write&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%2Fu6yi9te00ku1zuqjqwy0.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%2Fu6yi9te00ku1zuqjqwy0.png" alt="Image description" width="505" height="294"&gt;&lt;/a&gt;&lt;br&gt;
Steps:&lt;br&gt;
&lt;strong&gt;1.&lt;/strong&gt;Follow the same steps as Method 1 to enter edit mode and boot into /bin/bash.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.&lt;/strong&gt;Once you land in the shell, remount the filesystem with write permissions:&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%2F03u2w7pb6ii1nmhq4tg1.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%2F03u2w7pb6ii1nmhq4tg1.png" alt="Image description" width="718" height="434"&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;mount -o remount,rw /
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3.&lt;/strong&gt;Then change the root password:&lt;br&gt;
Passwd&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%2Fxrdwo1ur8i5j6sjeg3v1.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%2Fxrdwo1ur8i5j6sjeg3v1.png" alt="Image description" width="592" height="304"&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%2Ffypxq3z3eepx1oykmmmh.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%2Ffypxq3z3eepx1oykmmmh.png" alt="Image description" width="372" height="132"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4.&lt;/strong&gt;Finally, reboot the system.&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%2Fwav9utly64xl3ide8ymn.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%2Fwav9utly64xl3ide8ymn.png" alt="Image description" width="293" height="120"&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%2Fol01doj9fkkmxahjreqn.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%2Fol01doj9fkkmxahjreqn.png" alt="Image description" width="800" height="261"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use Case:&lt;/strong&gt; &lt;br&gt;
• IT Professionals recovering production systems.&lt;br&gt;
• Business: Essential for critical servers where the filesystem is initially in read-only mode to prevent accidental corruption.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;a id="use-the-end-key-trick"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Method 3: Use the End Key Trick&lt;/strong&gt;&lt;br&gt;
Steps:&lt;br&gt;
&lt;strong&gt;1.&lt;/strong&gt;On boot, press e.&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%2F7wtvttpw2rwqk5r003s6.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%2F7wtvttpw2rwqk5r003s6.png" alt="Image description" width="505" height="294"&gt;&lt;/a&gt; &lt;br&gt;
&lt;strong&gt;2.&lt;/strong&gt;Use the End key to jump directly to the end of the kernel line.&lt;br&gt;
&lt;strong&gt;3.&lt;/strong&gt;Add:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rd.break
&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%2Fcoin57m6m2ms5r8v03ec.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%2Fcoin57m6m2ms5r8v03ec.png" alt="Image description" width="719" height="288"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4.&lt;/strong&gt;Press Ctrl + X to continue booting.&lt;br&gt;
&lt;strong&gt;5.&lt;/strong&gt;At the switch_root prompt:&lt;br&gt;
&lt;strong&gt;6.&lt;/strong&gt;mount -o remount,rw /sysroot&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%2Ftophhtu3zpdirds4218k.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%2Ftophhtu3zpdirds4218k.png" alt="Image description" width="769" height="363"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7.&lt;/strong&gt;chroot /sysroot&lt;br&gt;
&lt;strong&gt;8.&lt;/strong&gt;passwd&lt;br&gt;
&lt;strong&gt;9.&lt;/strong&gt;touch /.autorelabel&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%2F4n479p8yu1hx1sdv5k4e.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%2F4n479p8yu1hx1sdv5k4e.png" alt="Image description" width="578" height="125"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;10.&lt;/strong&gt;exit and&lt;br&gt;
exit again&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%2Frrh87x8zswc2vxqopegg.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%2Frrh87x8zswc2vxqopegg.png" alt="Image description" width="497" height="175"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use Case:&lt;/strong&gt;&lt;br&gt;
• Advanced Users who need a deeper recovery without compromising SELinux labeling.&lt;br&gt;
• Business: Helps ensure compliance on secure systems where SELinux contexts must remain intact.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;a id="selinux-considerations"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Method 4: SELinux Considerations.&lt;/strong&gt;&lt;br&gt;
If SELinux is enforcing, resetting the password could lock you out after reboot. Here's how to deal with that:&lt;br&gt;
Important Tips:&lt;br&gt;
• If SELinux is set to permissive, you're good! No additional steps needed.&lt;br&gt;
• If it's enforcing, you must trigger a relabel:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Why does this matter? When SELinux is in enforcing mode, it checks file security contexts very strictly. Resetting the password without proper relabeling could deny root access even after setting a new password.&lt;br&gt;
&lt;strong&gt;Use Case:&lt;/strong&gt;&lt;br&gt;
• SysAdmins in highly regulated industries (finance, healthcare).&lt;br&gt;
• Business: Ensures compliance with strict security policies and prevents post-reset access issues.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;br&gt;
Resetting your Linux root password isn't as scary as it sounds - if you follow the right process. Always back up your system first, and pick the method that best suits your environment and urgency. Whether you're managing a personal project or a critical enterprise server, mastering these recovery tricks is a must-have skill in your admin toolkit.&lt;br&gt;
Stay safe, stay backed up, and happy hacking! &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;br&gt;&lt;br&gt;&lt;a href="//www.linkedin.com/in/alex-enson-a6692815a"&gt;Connect with me on LinkedIn&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
Stay tuned for more upcoming content!&lt;br&gt;&lt;br&gt;
#30DaysLinuxChallenge #RedHatEnterpriseLinux&lt;br&gt;
#CloudWhistler  #CloudEngineer  #Linux&lt;br&gt;
#DevOps #RedHat  #OpenSource&lt;br&gt;
#CloudComputing #Automation&lt;br&gt;
&lt;a href="https://dev.toCloudEngineer"&gt;#CloudEngineer&lt;/a&gt; &lt;a href="https://dev.toSysAdmin"&gt;#SysAdmin&lt;/a&gt; &lt;a href="https://dev.toITSecurity"&gt;#ITSecurity&lt;/a&gt; &lt;a href="https://dev.toTechTips"&gt;#TechTips&lt;/a&gt; &lt;a href="https://dev.toBusinessIT"&gt;#BusinessIT&lt;/a&gt; &lt;a href="https://dev.toLeadership"&gt;#Leadership&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Basic, ACL &amp; Special Permssions in Linux</title>
      <dc:creator>Alex Enson</dc:creator>
      <pubDate>Sat, 26 Apr 2025 18:41:25 +0000</pubDate>
      <link>https://dev.to/alexenson/basic-acl-special-permssions-in-linux-2l81</link>
      <guid>https://dev.to/alexenson/basic-acl-special-permssions-in-linux-2l81</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Have you ever wondered how Linux keeps your business data secure, yet flexible enough for collaboration? Whether you’re an IT pro or a business leader, understanding Linux permissions is your gateway to mastering file security, compliance, and operational efficiency. Let’s unlock the secrets behind Linux permissions-making your digital world safer, smarter, and more productive!&lt;br&gt;
&lt;br&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Index
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Basic Permissions: The Foundation of Linux Security&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;2. ACL Access Control List Permissions: Fine-Grained Control&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;3. Special Permissions: Power Tools for Advanced Scenarios&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;4. Summary&lt;/strong&gt;&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;a id="basic-permissions-the-foundation-of-linux-security"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;h2&gt;
  
  
  Basic Permissions: The Foundation of Linux Security
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Use Case:&lt;/strong&gt;&lt;br&gt;
Imagine your finance team working on sensitive payroll files stored on a Linux server. You want only authorized users to view or modify these files, while others are strictly kept out. This is where basic permissions shine!&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What are Basic Permissions?&lt;/strong&gt;&lt;br&gt;
Linux divides permissions into three categories:&lt;br&gt;
User (u): The file’s owner&lt;br&gt;
Group (g): A set of users&lt;br&gt;
Others (o): Everyone else&lt;br&gt;
Each can have read (r), write (w), and execute (x) permissions. This trio forms the backbone of Linux security.&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Essential Commands:&lt;/strong&gt;&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Check file permissions:&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;ls -l &amp;lt;file name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Check directory permissions:&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;ls -ld &lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Change owner:&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;chown &amp;lt;user&amp;gt; &amp;lt;file/directory&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Change group:&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;chgrp &amp;lt;group&amp;gt; &amp;lt;directory&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Change both owner and group:&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;chown &amp;lt;user&amp;gt;:&amp;lt;group&amp;gt; &amp;lt;directory&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;p&gt;&lt;strong&gt;Modify permissions (examples):&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 o-rwx &amp;lt;directory&amp;gt;      # Remove all permissions for others
chmod g-rx &amp;lt;directory&amp;gt;       # Remove read &amp;amp; execute for group
chmod u-w &amp;lt;directory&amp;gt;        # Remove write for owner
chmod u+rwx &amp;lt;directory&amp;gt;      # Full permissions for owner
chmod ugo+rwx &amp;lt;directory&amp;gt;    # Full permissions for everyone
chmod ugo=r-x &amp;lt;directory&amp;gt;    # Read &amp;amp; execute for all
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Business Impact:&lt;/strong&gt;&lt;br&gt;
Basic permissions help you enforce who can access, edit, or execute business-critical files, reducing the risk of accidental leaks or unauthorized changes.&lt;/p&gt;

&lt;p&gt;&lt;a id="acl-access-control-list-permissions-fine-grained-control"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;h2&gt;
  
  
  ACL Access Control List Permissions: Fine-Grained Control
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Use Case:&lt;/strong&gt;&lt;br&gt;
Suppose your marketing team needs temporary access to a confidential product launch folder, but you don’t want to change the group or global permissions. Enter ACLs for precision access!&lt;br&gt;
What are ACL Permissions?&lt;br&gt;
ACLs let you grant (or revoke) permissions to specific users or groups—beyond the basic owner/group/others model.&lt;br&gt;
Key ACL Commands:&lt;br&gt;
&lt;strong&gt;Check ACLs:&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;getfacl &amp;lt;directory&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Add user permission:&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;setfacl -m u:&amp;lt;username&amp;gt;:&amp;lt;permission&amp;gt; &amp;lt;directory&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Remove user permission:&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;setfacl -x u:&amp;lt;username&amp;gt; &amp;lt;directory&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Remove all ACLs:&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;setfacl -b &amp;lt;directory&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Add group permission:&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;setfacl -m g:&amp;lt;group_name&amp;gt;:&amp;lt;permission&amp;gt; &amp;lt;directory&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Remove group permission:&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;setfacl -x g:&amp;lt;group_name&amp;gt; &amp;lt;directory&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Business Impact:&lt;/strong&gt;&lt;br&gt;
With ACLs, you can empower project teams with just the right access-no more, no less. It’s flexibility without compromising security or compliance.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;a id="special-permissions-power-tools-for-advanced-scenarios"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Special Permissions: Power Tools for Advanced Scenarios
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Use Case:&lt;/strong&gt;&lt;br&gt;
Your IT team needs certain scripts to always run with administrative rights, regardless of who launches them. Special permissions like SUID, SGID, and Sticky Bit make this possible.&lt;br&gt;
&lt;br&gt;&lt;br&gt;
&lt;strong&gt;What are Special Permissions?&lt;/strong&gt;&lt;br&gt;
SUID (Set User ID): Executes a file with the owner's privileges.&lt;br&gt;
SGID (Set Group ID): Executes a file with the group’s privileges or ensures files in a directory inherit the group.&lt;br&gt;
Sticky Bit: Only the file owner can delete or rename files in a directory, even if others have write access.&lt;br&gt;
&lt;strong&gt;Business Impact:&lt;/strong&gt;&lt;br&gt;
Special permissions are essential for shared workspaces, secure script execution, and protecting critical business directories from accidental or malicious changes.&lt;br&gt;&lt;/p&gt;

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

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

&lt;p&gt;Linux permissions are more than just IT jargon-they’re your frontline defense and your ticket to smarter collaboration. From basic permissions that keep your business data safe, to ACLs that enable agile teamwork, and special permissions for advanced control, mastering these tools transforms how your organization works and innovates.&lt;br&gt;
Ready to take command of your Linux environment? Start experimenting, stay curious, and watch your business thrive with smarter security!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;br&gt;&lt;br&gt;&lt;a href="//www.linkedin.com/in/alex-enson-a6692815a"&gt;Connect with me on LinkedIn&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
#30DaysLinuxChallenge #RedHatEnterpriseLinux&lt;br&gt;
#CloudWhistler  #CloudEngineer  #Linux&lt;br&gt;
#DevOps #RedHat  #OpenSource&lt;br&gt;
#CloudComputing #Automation&lt;br&gt;
&lt;a href="https://dev.toCloudEngineer"&gt;#CloudEngineer&lt;/a&gt; &lt;a href="https://dev.toSysAdmin"&gt;#SysAdmin&lt;/a&gt; &lt;a href="https://dev.toITSecurity"&gt;#ITSecurity&lt;/a&gt; &lt;a href="https://dev.toTechTips"&gt;#TechTips&lt;/a&gt; &lt;a href="https://dev.toBusinessIT"&gt;#BusinessIT&lt;/a&gt; &lt;a href="https://dev.toLeadership"&gt;#Leadership&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>cloudwhistler</category>
      <category>opensource</category>
      <category>devops</category>
      <category>linux</category>
    </item>
    <item>
      <title>Special Permissions in Linux</title>
      <dc:creator>Alex Enson</dc:creator>
      <pubDate>Fri, 25 Apr 2025 15:11:30 +0000</pubDate>
      <link>https://dev.to/alexenson/special-permissions-in-linux-3mle</link>
      <guid>https://dev.to/alexenson/special-permissions-in-linux-3mle</guid>
      <description>&lt;h2&gt;
  
  
  👋Introduction
&lt;/h2&gt;

&lt;p&gt;Ever stumbled across strange-looking file permissions in Linux that include an "s" or a "t"? You're not alone. Welcome to the world of Special Permissions, the unsung heroes of Linux security and collaboration.&lt;br&gt;
Whether you're a system admin ensuring safe execution, a DevOps engineer managing shared directories, or a business leader driving secure team productivity, understanding these permissions isn't just technical fluff; it's strategic smarts.&lt;br&gt;
Let’s break them down in a way that actually makes sense and see how they solve real IT and business challenges.&lt;br&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  📚 Index
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;SUID Set User ID The Key to Controlled Power&lt;/li&gt;
&lt;li&gt;SGID Set Group ID The Secret to Seamless Collaboration&lt;/li&gt;
&lt;li&gt;Sticky Bit The Shield Against Accidental or Intentional Deletion&lt;/li&gt;
&lt;li&gt;Numeric Mode Mastering the Binary Behind the Magic&lt;/li&gt;
&lt;li&gt;
Summary

&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  SUID Set User ID The Key to Controlled Power
&lt;/h2&gt;

&lt;p&gt;What it does: When applied to an executable file, any user who runs it temporarily assumes the file owner's permissions.&lt;br&gt;
&lt;strong&gt;🔧 How to set it:&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 &amp;lt;file&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;🧹 How to remove it:&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 &amp;lt;file&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;💼 IT Use Case:&lt;/strong&gt;&lt;br&gt;
You're managing a script that needs root-level access (e.g., password updates), but you don't want to hand out the root password. SUID lets users execute it with elevated permissions without making them root. Smart, right?&lt;br&gt;
&lt;strong&gt;📈 Business Angle:&lt;/strong&gt;&lt;br&gt;
This enables secure automation in customer onboarding, employee provisioning, or financial processing-without compromising on control or security.&lt;br&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  SGID Set Group ID The Secret to Seamless Collaboration
&lt;/h2&gt;

&lt;p&gt;What it does: When set on a directory, new files/folders inside inherit the group ownership of the directory-not the user's group.&lt;br&gt;
&lt;strong&gt;🔧 How to set it:&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 g+s &amp;lt;directory&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;🧹 How to remove it:&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 g-s &amp;lt;directory&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;💼 IT Use Case:&lt;/strong&gt;&lt;br&gt;
Think of a shared project folder where everyone’s uploads need to stay in the same group. SGID ensures files don’t play musical chairs with permissions. Smooth collaboration, fewer headaches.&lt;br&gt;
&lt;strong&gt;📈 Business Angle:&lt;/strong&gt;&lt;br&gt;
Project teams-from developers to designers-can collaborate in a shared space with no permission hiccups. That’s faster delivery, less admin overhead, and happier teams.&lt;br&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Sticky Bit The Shield Against Accidental or Intentional Deletion
&lt;/h2&gt;

&lt;p&gt;What it does: In a shared directory, only the file owner can delete their own files-even if others have write access.&lt;br&gt;
&lt;strong&gt;🔧 How to set it:&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 o+t &amp;lt;directory&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;🧹 How to remove it:&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 o-t &amp;lt;directory&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;💼 IT Use Case:&lt;/strong&gt;&lt;br&gt;
Shared temp folders like /tmp are used by multiple users. Sticky Bit keeps user files safe from accidental (or malicious) deletion by others. Essential for multi-user systems.&lt;br&gt;
&lt;strong&gt;📈 Business Angle:&lt;/strong&gt;&lt;br&gt;
When teams share resources on a common drive, Sticky Bit ensures individual accountability and data protection, while still keeping things open and collaborative.&lt;br&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Numeric Mode Mastering the Binary Behind the Magic
&lt;/h2&gt;

&lt;p&gt;Want to set these special permissions quickly? Use numeric (octal) mode:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Permission&lt;/th&gt;
&lt;th&gt;Symbol&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;SUID&lt;/td&gt;
&lt;td&gt;u+s&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SGID&lt;/td&gt;
&lt;td&gt;g+s&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sticky Bit&lt;/td&gt;
&lt;td&gt;o+t&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Combine them with your regular permission (e.g., 755) like this:&lt;br&gt;
🔐 SUID 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 4755 &amp;lt;file&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Adds SUID&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;chmod -4000 &amp;lt;file&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Removes SUID&lt;br&gt;&lt;/p&gt;

&lt;p&gt;👥 SGID 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 2755 &amp;lt;dir&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Adds SGID&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;chmod -2000 &amp;lt;dir&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Removes SGID&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🛡 Sticky Bit Example:&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 1755 &amp;lt;dir&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Adds Sticky Bit&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;chmod -1000 &amp;lt;dir&amp;gt;  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Removes Sticky Bit&lt;br&gt;&lt;/p&gt;

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

&lt;p&gt;Why This Matters to You, Your Team and Your Business&lt;br&gt;
Linux special permissions aren’t just a technical quirk-they’re a powerful toolset that keeps your systems secure, your teams productive, and your operations clean.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🛠 SUID: Delegate power without risk&lt;/li&gt;
&lt;li&gt;🤝 SGID: Foster seamless group collaboration&lt;/li&gt;
&lt;li&gt;🛡 Sticky Bit: Protect shared environments from chaos&lt;/li&gt;
&lt;li&gt;🎯 Numeric mode: Efficient permission management for pros&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Whether you're an IT leader or a business driver, this knowledge bridges the gap between technical depth and practical value.&lt;br&gt;
🔥 Ready to elevate your Linux game? Drop your thoughts or questions in the comments-let’s make Linux a little less scary and a lot more empowering!&lt;br&gt;
&lt;strong&gt;&lt;br&gt;&lt;br&gt;&lt;a href="//www.linkedin.com/in/alex-enson-a6692815a"&gt;Connect with me on LinkedIn&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
#30DaysLinuxChallenge #RedHatEnterpriseLinux&lt;br&gt;
#CloudWhistler  #CloudEngineer  #Linux&lt;br&gt;
#DevOps #RedHat  #OpenSource&lt;br&gt;
#CloudComputing #Automation&lt;br&gt;
&lt;a href="https://dev.toCloudEngineer"&gt;#CloudEngineer&lt;/a&gt; &lt;a href="https://dev.toSysAdmin"&gt;#SysAdmin&lt;/a&gt; &lt;a href="https://dev.toITSecurity"&gt;#ITSecurity&lt;/a&gt; &lt;a href="https://dev.toTechTips"&gt;#TechTips&lt;/a&gt; &lt;a href="https://dev.toBusinessIT"&gt;#BusinessIT&lt;/a&gt; &lt;a href="https://dev.toLeadership"&gt;#Leadership&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

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