<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>90DaysOfDevOps &#8211; abdulrahmanuk.com</title>
	<atom:link href="https://www.abdulrahmanuk.com/category/90daysofdevops/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.abdulrahmanuk.com</link>
	<description>All about Cloud and DevOps</description>
	<lastBuildDate>Mon, 23 Jun 2025 08:07:31 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://www.abdulrahmanuk.com/wp-content/uploads/2023/02/icons8-devops-60.png</url>
	<title>90DaysOfDevOps &#8211; abdulrahmanuk.com</title>
	<link>https://www.abdulrahmanuk.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Day-5 Task &#8211; Advanced Linux Shell Scripting for DevOps Engineers with User Management</title>
		<link>https://www.abdulrahmanuk.com/day-5-task-advanced-linux-shell-scripting-for-devops-engineers-with-user-management/</link>
					<comments>https://www.abdulrahmanuk.com/day-5-task-advanced-linux-shell-scripting-for-devops-engineers-with-user-management/#respond</comments>
		
		<dc:creator><![CDATA[Abdul Rahman UK]]></dc:creator>
		<pubDate>Wed, 31 May 2023 13:38:21 +0000</pubDate>
				<category><![CDATA[90DaysOfDevOps]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[devops]]></category>
		<guid isPermaLink="false">https://www.abdulrahmanuk.com/?p=370</guid>

					<description><![CDATA[<p>Challenge: If you noticed that there are total 90 sub directories in the directory &#8216;2023&#8217; of this repository. What did you think, how did I create 90 directories. Manually one by one or using a script, or a command ? All 90 directories within seconds using a simple command. mkdir day{1..90} Tasks So Write a [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.abdulrahmanuk.com/day-5-task-advanced-linux-shell-scripting-for-devops-engineers-with-user-management/">Day-5 Task &#8211; Advanced Linux Shell Scripting for DevOps Engineers with User Management</a> appeared first on <a rel="nofollow" href="https://www.abdulrahmanuk.com">abdulrahmanuk.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Challenge:</p>



<p>If you noticed that there are total 90 sub directories in the directory &#8216;2023&#8217; of this repository. What did you think, how did I create 90 directories. Manually one by one or using a script, or a command ?</p>



<p>All 90 directories within seconds using a simple command.</p>



<p><code>mkdir day{1..90}</code></p>



<h3 class="wp-block-heading"><a href="https://github.com/abdulrahman911/90DaysOfDevOps/blob/master/2023/day05/tasks.md#tasks" rel="nofollow noopener" target="_blank"></a>Tasks</h3>



<ol class="wp-block-list">
<li>You have to do the same using Shell Script i.e using either Loops or command with start day and end day variables using arguments &#8211;</li>
</ol>



<p>So Write a bash script createDirectories.sh that when the script is executed with three given arguments (one is directory name and second is start number of directories and third is the end number of directories ) it creates specified number of directories with a dynamic directory name.</p>



<p>Example 1: When the script is executed as</p>



<p><code>./createDirectories.sh day 1 90</code></p>



<p>then it creates 90 directories as&nbsp;<code>day1 day2 day3 .... day90</code></p>



<p>Example 2: When the script is executed as</p>



<p><code>./createDirectories.sh Movie 20 50</code> then it creates 50 directories as <code>Movie20 Movie21 Movie23 ...Movie50</code></p>



<p>As we know that if we want to pass any argument at the time of bash script execution we used to denote it as like&nbsp;<mark>$1(first arg),$2(2nd arg)</mark>&nbsp;etc&#8230;So here we will do the same thing in a bash script like :</p>



<p>name of the file as&nbsp;<strong><mark><a href="http://createdirectories.sh/" target="_blank" rel="noreferrer noopener nofollow">createDirectories.sh</a></mark></strong></p>



<p><strong><mark>start_day as $2 and end_day as $3 and day as $1</mark></strong></p>



<p><strong><mark>Execute as ./<a href="http://createdirectories.sh/" target="_blank" rel="noreferrer noopener nofollow">createDirectories.sh</a> day 1 90</mark></strong></p>



<p></p>



<p><strong><mark>Output</mark></strong></p>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="2642" height="554" src="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-11.png" alt="image 11" class="wp-image-371" title="Day-5 Task - Advanced Linux Shell Scripting for DevOps Engineers with User Management 1" srcset="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-11.png 2642w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-11-768x161.png 768w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-11-1536x322.png 1536w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-11-2048x429.png 2048w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-11-150x31.png 150w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-11-300x63.png 300w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-11-696x146.png 696w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-11-1068x224.png 1068w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-11-1920x403.png 1920w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-11-600x126.png 600w" sizes="(max-width: 2642px) 100vw, 2642px" /></figure>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" style="font-size:.875rem;--cbp-line-number-color:#a6accd;--cbp-line-number-width:17.8046875px;line-height:1.25rem"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1b1e28"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" data-code="#!/bin/bash

if [ $# != 3 ]
then
	echo &quot;Can't proceed \n Please give three arguments to continue&quot;
	exit 1

fi

echo &quot;Creating directory as per your requirement&quot;
start_day=$2
end_day=$3

for (( i=start_day; i&lt;=end_day; i++ ))
do
	mkdir $1$i
done	

echo &quot;Here are your directories:&quot;
ls
" style="color:#a6accd;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki poimandres" style="background-color: #1b1e28"><code><span class="line"><span style="color: #A6ACCD">#!/bin/bash</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A6ACCD">if [ </span><span style="color: #D0679D">$#</span><span style="color: #A6ACCD"> </span><span style="color: #D0679D">!=</span><span style="color: #A6ACCD"> </span><span style="color: #5DE4C7">3</span><span style="color: #A6ACCD"> ]</span></span>
<span class="line"><span style="color: #A6ACCD">then</span></span>
<span class="line"><span style="color: #A6ACCD">	echo </span><span style="color: #A6ACCD">&quot;</span><span style="color: #5DE4C7">Can&#39;t proceed </span><span style="color: #5FB3A1">\n</span><span style="color: #5DE4C7"> Please give three arguments to continue</span><span style="color: #A6ACCD">&quot;</span></span>
<span class="line"><span style="color: #A6ACCD">	exit </span><span style="color: #5DE4C7">1</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A6ACCD">fi</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A6ACCD">echo </span><span style="color: #A6ACCD">&quot;</span><span style="color: #5DE4C7">Creating directory as per your requirement</span><span style="color: #A6ACCD">&quot;</span></span>
<span class="line"><span style="color: #A6ACCD">start_day=$</span><span style="color: #5DE4C7">2</span></span>
<span class="line"><span style="color: #A6ACCD">end_day=$</span><span style="color: #5DE4C7">3</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A6ACCD">for (( i=start_day; i&lt;=end_day; i++ ))</span></span>
<span class="line"><span style="color: #A6ACCD">do</span></span>
<span class="line"><span style="color: #A6ACCD">	mkdir $</span><span style="color: #5DE4C7">1</span><span style="color: #A6ACCD">$i</span></span>
<span class="line"><span style="color: #A6ACCD">done	</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A6ACCD">echo </span><span style="color: #A6ACCD">&quot;</span><span style="color: #5DE4C7">Here are your directories:</span><span style="color: #A6ACCD">&quot;</span></span>
<span class="line"><span style="color: #A6ACCD">ls</span></span>
<span class="line"></span></code></pre></div>



<p><strong>2. Create a Script to back up all your work done till now.</strong></p>



<p>Backups are an important part of DevOps Engineers&#8217; day to Day activities. Usually, when we create any backup of a file we used to create a zip file by using the tar command:&nbsp;<strong>tar -czvf file.tar.gz directory_name</strong></p>



<p>Here is a simple shell script to take a backup of recent work:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" style="font-size:.875rem;--cbp-line-number-color:#a6accd;--cbp-line-number-width:17.8046875px;line-height:1.25rem"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1b1e28"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" data-code="#!/bin/bash

src_directory=/var/www/my-blog

BACKUP_FILENAME=&quot;backup_$(date +%Y-%m-%d).tar.gz&quot;
TARGET_DIRECTORY=&quot;/home/ubuntu/backup/&quot;

#Create backup archive
tar -czvf $TARGET_DIRECTORY/$BACKUP_FILENAME $src_directory

if [ $? -eq 0 ]; then
	echo &quot;Backup successful!&quot;
else
	echo &quot;Backup failed.&quot;
fi

" style="color:#a6accd;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki poimandres" style="background-color: #1b1e28"><code><span class="line"><span style="color: #A6ACCD">#!/bin/bash</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A6ACCD">src_directory=/var/www/my-blog</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A6ACCD">BACKUP_FILENAME=</span><span style="color: #A6ACCD">&quot;</span><span style="color: #5DE4C7">backup_$(date +%Y-%m-%d).tar.gz</span><span style="color: #A6ACCD">&quot;</span></span>
<span class="line"><span style="color: #A6ACCD">TARGET_DIRECTORY=</span><span style="color: #A6ACCD">&quot;</span><span style="color: #5DE4C7">/home/ubuntu/backup/</span><span style="color: #A6ACCD">&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A6ACCD">#Create backup archive</span></span>
<span class="line"><span style="color: #A6ACCD">tar -czvf $TARGET_DIRECTORY/$BACKUP_FILENAME $src_directory</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A6ACCD">if [ </span><span style="color: #D0679D">$?</span><span style="color: #A6ACCD"> </span><span style="color: #D0679D">-eq</span><span style="color: #A6ACCD"> </span><span style="color: #5DE4C7">0</span><span style="color: #A6ACCD"> ]; then</span></span>
<span class="line"><span style="color: #A6ACCD">	echo </span><span style="color: #A6ACCD">&quot;</span><span style="color: #5DE4C7">Backup successful!</span><span style="color: #A6ACCD">&quot;</span></span>
<span class="line"><span style="color: #A6ACCD">else</span></span>
<span class="line"><span style="color: #A6ACCD">	echo </span><span style="color: #A6ACCD">&quot;</span><span style="color: #5DE4C7">Backup failed.</span><span style="color: #A6ACCD">&quot;</span></span>
<span class="line"><span style="color: #A6ACCD">fi</span></span>
<span class="line"></span>
<span class="line"></span></code></pre></div>



<p><strong>3. Read About Cron and Crontab, to automate the backup Script</strong></p>



<p>Cron is a system process that will automatically perform tasks as per the specific schedule. It is a set of commands that are used for running regular scheduling tasks. Crontab stands for “<mark>cron table</mark>”. It allows using a job scheduler, which is known as cron to execute tasks.</p>



<p>Crontab is also the name of the program, which is used to edit that schedule. It is driven by a crontab file, a config file that indicates shell commands to run periodically for the specific schedule.</p>



<p><strong><mark>Reasons for using Cron jobs:</mark></strong></p>



<ul class="wp-block-list">
<li>Helps OS to take a scheduled backup of log files or database.</li>



<li>Delete old log files</li>



<li>Archive and purge database tables</li>



<li>Send out any notification email such as Newsletters, Password expiration email</li>



<li>Regular clean-up of cached data</li>



<li>Crontab is an ideal option to automate Unix jobs.</li>



<li>It is used to automate system maintenance</li>
</ul>



<p><strong>Crontab syntax:</strong></p>



<p><strong><mark>MIN HOUR DOM MON DOW CMD</mark></strong></p>



<p><strong>Ranges :</strong></p>



<figure class="wp-block-image size-full"><img decoding="async" width="1262" height="516" src="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-13.png" alt="image 13" class="wp-image-373" title="Day-5 Task - Advanced Linux Shell Scripting for DevOps Engineers with User Management 2" srcset="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-13.png 1262w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-13-768x314.png 768w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-13-150x61.png 150w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-13-300x123.png 300w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-13-696x285.png 696w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-13-1068x437.png 1068w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-13-600x245.png 600w" sizes="(max-width: 1262px) 100vw, 1262px" /></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="996" height="466" src="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-14.png" alt="image 14" class="wp-image-374" title="Day-5 Task - Advanced Linux Shell Scripting for DevOps Engineers with User Management 3" srcset="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-14.png 996w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-14-768x359.png 768w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-14-150x70.png 150w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-14-300x140.png 300w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-14-696x326.png 696w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-14-600x281.png 600w" sizes="(max-width: 996px) 100vw, 996px" /></figure>



<p><strong>4. Read about User Management</strong></p>



<p>User management includes everything from creating a user to deleting a user on your system.</p>



<h3 class="wp-block-heading" id="heading-root"><a href="https://tanaya.hashnode.dev/advanced-linux-shell-scripting-for-devops-engineers-with-user-management-day-5-task#heading-root" rel="nofollow noopener" target="_blank"></a><strong>root</strong></h3>



<p>The root user is the superuser and has all the powers for creating a user, deleting a user and can even login in with the other user&#8217;s account. The root user always has userid 0.</p>



<h3 class="wp-block-heading" id="heading-useradd"><a href="https://tanaya.hashnode.dev/advanced-linux-shell-scripting-for-devops-engineers-with-user-management-day-5-task#heading-useradd" rel="nofollow noopener" target="_blank"></a><strong>useradd</strong></h3>



<p>1. With useradd command, you can add a user.</p>



<p>Syntax:&nbsp;<strong><mark>sudo adduser username [you should have the super user power to add a user]</mark></strong></p>



<p><strong>Then</strong>&nbsp;<mark>Enter the password for the new account and confirm</mark></p>



<p>You can check the newly added user from the file&nbsp;<strong><mark>/etc/passwd</mark></strong></p>



<p>Command:&nbsp;<strong>cat /etc/passwd</strong></p>



<p>2.&nbsp;<strong>For disabling an account using Terminal, remove the password set on the account.</strong></p>



<p><strong><mark>sudo passwd -l &#8216;username&#8217;</mark></strong></p>



<p>3. To delete an account, use the command –</p>



<p><strong><mark>sudo userdel -r &#8216;username</mark></strong></p>



<h2 class="wp-block-heading" id="heading-5-create-2-users-and-just-display-their-usernames"><strong>5. Create 2 users and just display their Usernames</strong></h2>



<p>Added two users by using the useradd command :</p>



<p>$ sudo useradd Sam</p>



<p>$ sudo useradd Vinod</p>



<p>To display their name use <strong>cat /etc/passwd</strong> and redirected the output to the <strong>tail</strong> command to see only the last two lines from the file :</p>



<p>To display their name use <strong>cat /etc/passwd</strong> and redirected the output to the <strong>tail</strong> command to see only the last two lines from the file :</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1606" height="356" src="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-15.png" alt="image 15" class="wp-image-375" title="Day-5 Task - Advanced Linux Shell Scripting for DevOps Engineers with User Management 4" srcset="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-15.png 1606w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-15-768x170.png 768w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-15-1536x340.png 1536w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-15-150x33.png 150w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-15-300x67.png 300w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-15-696x154.png 696w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-15-1068x237.png 1068w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-15-600x133.png 600w" sizes="auto, (max-width: 1606px) 100vw, 1606px" /></figure>



<h2 class="wp-block-heading" id="heading-5-create-2-users-and-just-display-their-usernames"><a href="https://tanaya.hashnode.dev/advanced-linux-shell-scripting-for-devops-engineers-with-user-management-day-5-task#heading-5-create-2-users-and-just-display-their-usernames" rel="nofollow noopener" target="_blank"></a></h2>
<p>The post <a rel="nofollow" href="https://www.abdulrahmanuk.com/day-5-task-advanced-linux-shell-scripting-for-devops-engineers-with-user-management/">Day-5 Task &#8211; Advanced Linux Shell Scripting for DevOps Engineers with User Management</a> appeared first on <a rel="nofollow" href="https://www.abdulrahmanuk.com">abdulrahmanuk.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.abdulrahmanuk.com/day-5-task-advanced-linux-shell-scripting-for-devops-engineers-with-user-management/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Day 6 &#8211; Linux File Permissions and Access Control Lists</title>
		<link>https://www.abdulrahmanuk.com/day-6-linux-file-permissions-and-access-control-lists/</link>
					<comments>https://www.abdulrahmanuk.com/day-6-linux-file-permissions-and-access-control-lists/#comments</comments>
		
		<dc:creator><![CDATA[Abdul Rahman UK]]></dc:creator>
		<pubDate>Wed, 31 May 2023 13:54:07 +0000</pubDate>
				<category><![CDATA[90DaysOfDevOps]]></category>
		<category><![CDATA[devops]]></category>
		<category><![CDATA[linux]]></category>
		<guid isPermaLink="false">https://www.abdulrahmanuk.com/?p=378</guid>

					<description><![CDATA[<p>1. About File Permissions: File permissions are core to the security model used by Linux systems. They determine who can access files and directories on a system and how. To check a file permission as : ls -l &#60;file-name> Permission Descriptions: Owner (u):&#160;Permissions used for the Owner of the file. Group(g):&#160;Permissions used by members of [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.abdulrahmanuk.com/day-6-linux-file-permissions-and-access-control-lists/">Day 6 &#8211; Linux File Permissions and Access Control Lists</a> appeared first on <a rel="nofollow" href="https://www.abdulrahmanuk.com">abdulrahmanuk.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading" id="heading-1-about-file-permissions"><strong><mark>1. About File Permissions:</mark></strong></h2>



<p>File permissions are core to the security model used by Linux systems. They determine who can access files and directories on a system and how.</p>



<p>To check a file permission as :</p>



<p><strong><mark>ls -l &lt;file-name></mark></strong></p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1542" height="288" src="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-16.png" alt="image 16" class="wp-image-379" title="Day 6 - Linux File Permissions and Access Control Lists 5" srcset="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-16.png 1542w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-16-768x143.png 768w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-16-1536x287.png 1536w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-16-150x28.png 150w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-16-300x56.png 300w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-16-696x130.png 696w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-16-1068x199.png 1068w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-16-600x112.png 600w" sizes="auto, (max-width: 1542px) 100vw, 1542px" /></figure>



<p><strong><mark>Permission Descriptions:</mark></strong></p>



<ol class="wp-block-list">
<li><strong>Read (r):</strong>&nbsp;The read permission allows you to open and read the content of a file. But you can&#8217;t do any editing or modification in the file.</li>



<li><strong>Write (w):</strong>&nbsp;The write permission allows you to edit, remove or rename a file. For instance, if a file is present in a directory, and write permission is set on the file but not on the directory, then you can edit the content of the file but can&#8217;t remove, or rename it.</li>



<li><strong>Execute (x):</strong>&nbsp;In Unix type system, you can&#8217;t run or execute a program unless execute permission is set. But in Windows, there is no such permission available.</li>
</ol>



<p><strong><mark>Owner (u):</mark></strong>&nbsp;Permissions used for the Owner of the file.</p>



<p><strong><mark>Group(g):</mark></strong>&nbsp;Permissions used by members of the group.</p>



<p><strong><mark>Other(o):</mark></strong>&nbsp;Permissions used by all other users.</p>



<p><strong><mark>Permission Set:</mark></strong></p>



<figure class="wp-block-table"><table><thead><tr><td>permission</td><td>on a file</td><td>on a directory</td></tr></thead><tbody><tr><td>r (read)</td><td>read file content (cat)</td><td>read directory content (ls)</td></tr><tr><td>w (write)</td><td>change file content (vi)</td><td>create a file in the directory (touch)</td></tr><tr><td>x (execute)</td><td>execute the file</td><td>enter the directory (cd)</td></tr></tbody></table></figure>



<p><strong><mark>Permissions in detail:</mark></strong></p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1484" height="926" src="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-17.png" alt="image 17" class="wp-image-380" title="Day 6 - Linux File Permissions and Access Control Lists 6" srcset="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-17.png 1484w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-17-768x479.png 768w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-17-150x94.png 150w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-17-300x187.png 300w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-17-696x434.png 696w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-17-1068x666.png 1068w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-17-600x374.png 600w" sizes="auto, (max-width: 1484px) 100vw, 1484px" /></figure>



<p><strong><mark>Change File Permissions:</mark></strong></p>



<p>a)&nbsp;<strong><mark>chmod</mark></strong>: Change file access permissions.</p>



<p><strong>Description:</strong>&nbsp;This command is used to change the file permissions. These permissions read, write and execute permission for the owner, group, and others.</p>



<p><strong>Syntax (symbolic mode)</strong>:&nbsp;<em><mark>chmod [ugoa][[+-=][mode]] file</mark></em></p>



<p>The first optional parameter indicates who – this can be (u)ser, (g)roup, (o)there, or (a)ll.</p>



<p>The second optional parameter indicates opcode – this can be for adding (+), removing (-), or assigning (=) permission.</p>



<p>The third optional parameter indicates the mode – this can be (r)ead, (w)rite, or e(x) acute.</p>



<p><strong>Example</strong>: Add writes permission for user, group, and others for file1.</p>



<p><strong><em><mark>$ chmod ugo+w file1</mark></em></strong></p>



<p>There is another way to change file permissions by numeric symbol:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1114" height="458" src="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-18.png" alt="image 18" class="wp-image-381" title="Day 6 - Linux File Permissions and Access Control Lists 7" srcset="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-18.png 1114w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-18-768x316.png 768w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-18-150x62.png 150w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-18-300x123.png 300w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-18-696x286.png 696w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-18-1068x439.png 1068w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-18-600x247.png 600w" sizes="auto, (max-width: 1114px) 100vw, 1114px" /></figure>



<p><strong>Example</strong>: Give read/write/execute permission to the user, read/execute permission to the group, and execute permission to others.</p>



<p><strong><em><mark>$ chmod 751 file1</mark></em></strong></p>



<p>b)&nbsp;<strong><mark>chown</mark></strong>: Change ownership of the file.</p>



<p><strong>Description</strong>: Only the owner of the file has the right to change the file ownership.</p>



<p><strong>Syntax</strong>: chown [owner] [file]</p>



<p><strong>Example</strong>: Change the owner of file1 to user2 assuming it is currently owned by the current user</p>



<p><strong><em><mark>$ chown user2 file1</mark></em></strong></p>



<p>c)&nbsp;<strong><mark>chgrp</mark></strong>: Change the group ownership of the file</p>



<p><strong>Description</strong>: Only the owner of the file has the right to change the file ownership</p>



<p><strong>Syntax</strong>: chgrp [group] [file]</p>



<p><strong>Example</strong>: Change group of file1 to group2 assuming it is currently owned by the current user</p>



<p><strong><em><mark>$ chgrp group2 file1</mark></em></strong></p>



<p><strong>2. Create a simple file and check the details of the file:</strong></p>



<p>Here I created one file by using <strong><mark>the touch command</mark></strong> and then check the details of the file by using the <strong><mark>ls -l command </mark></strong>and then change the file permissions to <strong>766</strong> [all owner permissions, read and write permissions to group and others].<br></p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1184" height="348" src="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-19.png" alt="image 19" class="wp-image-382" title="Day 6 - Linux File Permissions and Access Control Lists 8" srcset="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-19.png 1184w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-19-768x226.png 768w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-19-150x44.png 150w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-19-300x88.png 300w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-19-696x205.png 696w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-19-1068x314.png 1068w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-19-600x176.png 600w" sizes="auto, (max-width: 1184px) 100vw, 1184px" /></figure>



<p><strong>3 . Read about ACL and try out the commands getfacl and setfacl</strong></p>



<p>Access control list (ACL) provides an additional, more flexible permission mechanism for file systems. It is designed to assist with UNIX file permissions. ACL allows you to give permissions for any user or group to any disc resource.</p>



<p><strong>Use Of ACL:</strong>&nbsp;Think of a scenario in which a particular user is not a member of a group created by you but still you want to give some read or write access, how can you do it without making the user a member of the group, here comes in picture Access Control Lists, ACL helps us to do this trick.</p>



<p>ACLs are used to make a flexible permission mechanism in Linux.</p>



<p>From Linux man pages, ACLs are used to define more fine-grained discretionary access rights for files and directories.</p>



<p><strong><mark>setfacl and getfacl command:</mark></strong></p>



<p>The command&nbsp;<mark>&#8220;setfacl&#8221;</mark>&nbsp;refers to Set File Access Control Lists and&nbsp;<mark>&#8220;getfacl&#8221;</mark>&nbsp;refers to Get File Access Control List.</p>



<p>Example:</p>



<p><strong>getfacl &lt;file or directory name&gt;</strong></p>



<p>1. To add permission for user</p>



<p><strong>setfacl -m &#8220;u:user: permissions&#8221; /path/to/file</strong></p>



<p>setfacl -m u:tanaya:rwx test/declarations.h</p>



<p>2. To add permissions for a group</p>



<p><strong>setfacl -m &#8220;g:group: permissions&#8221; /path/to/file</strong></p>



<p>3. To remove ACL permission of user:</p>



<p><strong>setfacl -x &#8220;u:user: permissions&#8221; /path/to/file</strong></p>



<p>4. To remove ACL permission of group:</p>



<p><strong>setfacl -x &#8220;g:group: permissions&#8221; /path/to/file</strong></p>



<p></p>
<p>The post <a rel="nofollow" href="https://www.abdulrahmanuk.com/day-6-linux-file-permissions-and-access-control-lists/">Day 6 &#8211; Linux File Permissions and Access Control Lists</a> appeared first on <a rel="nofollow" href="https://www.abdulrahmanuk.com">abdulrahmanuk.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.abdulrahmanuk.com/day-6-linux-file-permissions-and-access-control-lists/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Day 7 Task &#8211; Understanding package manager and systemctl</title>
		<link>https://www.abdulrahmanuk.com/day-7-task-understanding-package-manager-and-systemctl/</link>
					<comments>https://www.abdulrahmanuk.com/day-7-task-understanding-package-manager-and-systemctl/#respond</comments>
		
		<dc:creator><![CDATA[Abdul Rahman UK]]></dc:creator>
		<pubDate>Fri, 02 Jun 2023 19:16:53 +0000</pubDate>
				<category><![CDATA[90DaysOfDevOps]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[devops]]></category>
		<guid isPermaLink="false">https://www.abdulrahmanuk.com/?p=385</guid>

					<description><![CDATA[<p>#90DaysOfDevopsChallenge 1. Pacakage Manager A package manager is a tool that allows users to install, remove, upgrade, configure and manage software packages on an operating system. The package manager can be a graphical application like a software center or a command lines tool like&#160;apt-get&#160;or&#160;Pacman. What is a Package? A package is usually referred to an [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.abdulrahmanuk.com/day-7-task-understanding-package-manager-and-systemctl/">Day 7 Task &#8211; Understanding package manager and systemctl</a> appeared first on <a rel="nofollow" href="https://www.abdulrahmanuk.com">abdulrahmanuk.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p><span style="background-color:#cdfe00" class="td_text_highlight_marker">#90DaysOfDevopsChallenge</span></p>



<p><mark><strong>1. Pacakage Manager</strong></mark></p>



<p>A package manager is a tool that allows users to install, remove, upgrade, configure and manage software packages on an operating system. The package manager can be a graphical application like a software center or a command lines tool like&nbsp;apt-get&nbsp;or&nbsp;Pacman.</p>



<h2 class="wp-block-heading" id="heading-what-is-a-package"><strong><mark>What is a Package?</mark></strong></h2>



<p>A package is usually referred to an application but it could be a GUI application, command line tool or a software library (required by other software programs). A package is essentially an archive file containing the binary executable, configuration file and sometimes information about the dependencies.</p>



<h2 class="wp-block-heading" id="heading-how-does-the-package-manager-work"><mark>How does the package manager work?</mark></h2>



<p>The package manager is a generic concept and it’s not exclusive to Linux. You’ll often find package managers for different software or programming languages. There is a PIP package manager just for Python packages.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1522" height="480" src="https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image.png" alt="image" class="wp-image-386" title="Day 7 Task - Understanding package manager and systemctl 9" srcset="https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image.png 1522w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-768x242.png 768w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-150x47.png 150w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-300x95.png 300w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-696x220.png 696w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-1068x337.png 1068w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-600x189.png 600w" sizes="auto, (max-width: 1522px) 100vw, 1522px" /></figure>



<p>Almost all Linux distributions have software repositories which is a collections of software packages. Yes, there could be more than one repository. The repositories contain software packages of a different kinds.</p>



<p>Repositories also have metadata files that contain information about the packages such as the name of the package, version number, description of the package and the repository name etc. This is what you see if you use the&nbsp;<strong>apt show command</strong>&nbsp;in Ubuntu/Debian.</p>



<p>Your system’s package manager first interacts with the metadata. The package manager creates a local cache of metadata on your system. When you run the update option of the package manager (for example apt update), it updates this local cache of metadata by referring to metadata from the repository.</p>



<p>When you run the installation command of your package manager (for example apt install package_name), the package manager refers to this cache. If it finds the package information in the cache, it uses the internet connection to connect to the appropriate repository and downloads the package first before installing on your system.</p>



<p>A package may have dependencies. Meaning that it may require other packages to be installed. The package manager often takes care of the dependencies and installs it automatically along with the package you are installing.</p>



<p><strong><mark>Types of Package Managers:</mark></strong></p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1268" height="794" src="https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-1.png" alt="image 1" class="wp-image-387" title="Day 7 Task - Understanding package manager and systemctl 10" srcset="https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-1.png 1268w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-1-768x481.png 768w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-1-150x94.png 150w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-1-300x188.png 300w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-1-696x436.png 696w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-1-1068x669.png 1068w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-1-600x376.png 600w" sizes="auto, (max-width: 1268px) 100vw, 1268px" /></figure>



<ul class="wp-block-list">
<li><strong>1. DPKG – Debian Package Management System</strong></li>



<li><a href="https://tanaya.hashnode.dev/understanding-package-manager-and-systemctlday-7-task#heading-apt-advanced-packaging-tool" rel="nofollow noopener" target="_blank"></a><strong>APT (Advanced Packaging Tool) :</strong><a href="https://tanaya.hashnode.dev/understanding-package-manager-and-systemctlday-7-task#heading-it-is-a-very-popular-free-powerful-and-more-so-useful-command-line-package-management-system-that-is-a-front-end-for-the-dpkg-package-management-system" rel="nofollow noopener" target="_blank"></a>It is a very popular, free, powerful, and more so, useful command line package management system that is a front end for the dpkg package management system.Users of Debian or its derivatives such as Ubuntu and Linux Mint should be familiar with this package management tool.</li>



<li><a href="https://tanaya.hashnode.dev/understanding-package-manager-and-systemctlday-7-task#heading-aptitude-package-manager" rel="nofollow noopener" target="_blank"></a><strong>Aptitude Package Manager</strong>This is also a popular command line front-end package management tool for the&nbsp;<strong>Debian</strong>&nbsp;Linux family, it works similarly to&nbsp;<strong>APT</strong>&nbsp;. It was initially built for Debian and its derivatives but now its functionality stretches to the&nbsp;<strong>RHEL</strong>&nbsp;family.</li>



<li><strong>2. RPM (Red Hat Package Manager)</strong></li>



<li><a href="https://tanaya.hashnode.dev/understanding-package-manager-and-systemctlday-7-task#heading-yum-yellowdog-updater-modified" rel="nofollow noopener" target="_blank"></a><strong>YUM (Yellowdog Updater, Modified)</strong>It is an open-source and popular command line package manager that works as an interface for users to RPM. You can compare it to&nbsp;<strong>APT</strong>&nbsp;under Debian Linux systems, it incorporates the common functionalities that APT has.</li>



<li><strong>3.</strong>&nbsp;<strong>Pacman Package Manager – Arch Linux</strong></li>



<li><strong>4.</strong>&nbsp;<strong>Zypper Package Manager – openSUSE</strong></li>



<li><strong>5. Portage Package Manager – Gentoo</strong></li>
</ul>



<p><strong>2. You have to install docker and Jenkins in your system from your terminal using package managers</strong></p>



<p><strong><mark>Jenkins:</mark></strong></p>



<p>To install Jenkins you first have to install&nbsp;<strong><mark>java</mark></strong>. So this is some steps to install java:</p>



<p>Initially update all packages used in the below command. <span style="background-color:#0ea3e6" class="td_text_highlight_marker">NOTE: I&#8217;m showing here for Ubuntu operating system.</span></p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#a6accd;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1b1e28"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#a6accd;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo apt update</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki poimandres" style="background-color: #1b1e28" tabindex="0"><code><span class="line"><span style="color: #A6ACCD">sudo apt update</span></span></code></pre></div>



<p>Depending on which Java version you want to install, Java 8 or 11, run one of the following commands:</p>



<p>To install OpenJDK 8, run:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#a6accd;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1b1e28"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#a6accd;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo apt install openjdk-8-jdk -y</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki poimandres" style="background-color: #1b1e28" tabindex="0"><code><span class="line"><span style="color: #A6ACCD">sudo apt install openjdk</span><span style="color: #5DE4C7">-8</span><span style="color: #A6ACCD">-jdk -y</span></span></code></pre></div>



<p>To install OpenJDK 11, run:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#a6accd;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1b1e28"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#a6accd;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo apt install openjdk-11-jdk -y</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki poimandres" style="background-color: #1b1e28" tabindex="0"><code><span class="line"><span style="color: #A6ACCD">sudo apt install openjdk</span><span style="color: #5DE4C7">-11</span><span style="color: #A6ACCD">-jdk -y</span></span></code></pre></div>



<p><strong>Add Jenkins Repository</strong></p>



<p>The version of Jenkins included with the default Ubuntu packages is often behind the latest available version from the project itself. To ensure you have the latest fixes and features, use the project-maintained packages to install Jenkins.</p>



<p>First, add the repository key to your system:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#a6accd;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1b1e28"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#a6accd;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key |sudo gpg --dearmor -o /usr/share/keyrings/jenkins.gpg</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki poimandres" style="background-color: #1b1e28" tabindex="0"><code><span class="line"><span style="color: #A6ACCD">wget -q -O - https:</span><span style="color: #767C9DB0; font-style: italic">//pkg.jenkins.io/debian-stable/jenkins.io.key |sudo gpg --dearmor -o /usr/share/keyrings/jenkins.gpg</span></span></code></pre></div>



<p>The&nbsp;<code>gpg --dearmor</code>&nbsp;command is used to convert the key into a format that&nbsp;<code>apt</code>&nbsp;recognizes.</p>



<p>Next, let’s append the Debian package repository address to the server’s&nbsp;<code>sources.list</code>:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#a6accd;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1b1e28"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#a6accd;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo sh -c 'echo deb [signed-by=/usr/share/keyrings/jenkins.gpg] http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki poimandres" style="background-color: #1b1e28" tabindex="0"><code><span class="line"><span style="color: #A6ACCD">sudo sh -c &#39;echo deb [</span><span style="color: #D0679D">signed-by=/usr/share/keyrings/jenkins.gpg</span><span style="color: #A6ACCD">] http:</span><span style="color: #767C9DB0; font-style: italic">//pkg.jenkins.io/debian-stable binary/ &gt; /etc/apt/sources.list.d/jenkins.list&#39;</span></span></code></pre></div>



<p>The&nbsp;<code>[signed-by=/usr/share/keyrings/jenkins.gpg]</code>&nbsp;portion of the line ensures that&nbsp;<code>apt</code>&nbsp;will verify files in the repository using the GPG key that you just downloaded.</p>



<p>After both commands have been entered, run&nbsp;<code>apt update</code>&nbsp;so that&nbsp;<code>apt</code>&nbsp;will use the new repository.</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#a6accd;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1b1e28"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#a6accd;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo apt update</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki poimandres" style="background-color: #1b1e28" tabindex="0"><code><span class="line"><span style="color: #A6ACCD">sudo apt update</span></span></code></pre></div>



<p>Finally, install Jenkins and its dependencies:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#a6accd;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1b1e28"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#a6accd;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo apt install jenkins</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki poimandres" style="background-color: #1b1e28" tabindex="0"><code><span class="line"><span style="color: #A6ACCD">sudo apt install jenkins</span></span></code></pre></div>



<p>Now that Jenkins and its dependencies are in place, we’ll start the Jenkins server.</p>



<p><strong>Starting Jenkins</strong></p>



<p>now that Jenkins is installed, start it by using&nbsp;<code>systemctl</code>:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#a6accd;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1b1e28"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#a6accd;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo systemctl start jenkins.service</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki poimandres" style="background-color: #1b1e28" tabindex="0"><code><span class="line"><span style="color: #A6ACCD">sudo systemctl start jenkins.service</span></span></code></pre></div>



<p>Since&nbsp;<code>systemctl</code>&nbsp;doesn’t display status output, we’ll use the&nbsp;<code>status</code>&nbsp;command to verify that Jenkins started successfully:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#a6accd;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1b1e28"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#a6accd;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo systemctl status jenkins</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki poimandres" style="background-color: #1b1e28" tabindex="0"><code><span class="line"><span style="color: #A6ACCD">sudo systemctl status jenkins</span></span></code></pre></div>



<p>If everything went well, the beginning of the status output shows that the service is active and configured to start at boot:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1504" height="802" src="https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-2.png" alt="image 2" class="wp-image-388" title="Day 7 Task - Understanding package manager and systemctl 11" srcset="https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-2.png 1504w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-2-768x410.png 768w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-2-150x80.png 150w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-2-300x160.png 300w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-2-696x371.png 696w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-2-1068x570.png 1068w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-2-600x320.png 600w" sizes="auto, (max-width: 1504px) 100vw, 1504px" /></figure>



<p>you have completed the installation stage and can continue with configuring Jenkins.</p>



<p><strong><mark>Docker installation:</mark></strong></p>



<p><strong><mark>step 1: sudo apt update -y</mark></strong></p>



<p><strong><mark>step 2: sudo apt install&nbsp;docker.io&nbsp;-y</mark></strong></p>



<p><strong><mark>step 3: docker &#8211;version</mark></strong></p>



<p><strong><mark>step 4: systemctl status docker [ to check if docker is in the active state]</mark></strong></p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1612" height="854" src="https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-3.png" alt="image 3" class="wp-image-389" title="Day 7 Task - Understanding package manager and systemctl 12" srcset="https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-3.png 1612w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-3-768x407.png 768w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-3-1536x814.png 1536w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-3-150x79.png 150w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-3-300x159.png 300w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-3-696x369.png 696w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-3-1068x566.png 1068w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-3-600x318.png 600w" sizes="auto, (max-width: 1612px) 100vw, 1612px" /></figure>



<h3 class="wp-block-heading" id="heading-3-systemctl-and-systemd"><strong><mark>systemctl and systemd</mark></strong></h3>



<p><strong><mark>systemctl</mark></strong>&nbsp;is used to examine and control the state of the “<strong><mark>systemd”</mark></strong>&nbsp;system and service manager.</p>



<p><strong><mark>systemd&nbsp;</mark></strong>is a system and service manager for Unix-like operating systems(most of the distributions, not all).</p>



<h3 class="wp-block-heading" id="heading-4-stop-the-service-jenkins-and-post-before-and-after-screenshots"><a href="https://tanaya.hashnode.dev/understanding-package-manager-and-systemctlday-7-task#heading-4-stop-the-service-jenkins-and-post-before-and-after-screenshots" rel="nofollow noopener" target="_blank"></a><strong>4. stop the service Jenkins and post before and after screenshots</strong></h3>



<p><strong><mark>Jenkins active status Screenshot:</mark></strong></p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1408" height="762" src="https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-4.png" alt="image 4" class="wp-image-390" title="Day 7 Task - Understanding package manager and systemctl 13" srcset="https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-4.png 1408w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-4-768x416.png 768w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-4-150x81.png 150w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-4-300x162.png 300w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-4-696x377.png 696w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-4-1068x578.png 1068w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-4-600x325.png 600w" sizes="auto, (max-width: 1408px) 100vw, 1408px" /></figure>



<p><strong><mark>Jenkins stop Screenshot :</mark></strong></p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1372" height="612" src="https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-5.png" alt="image 5" class="wp-image-391" title="Day 7 Task - Understanding package manager and systemctl 14" srcset="https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-5.png 1372w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-5-768x343.png 768w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-5-150x67.png 150w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-5-300x134.png 300w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-5-696x310.png 696w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-5-1068x476.png 1068w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/06/image-5-600x268.png 600w" sizes="auto, (max-width: 1372px) 100vw, 1372px" /></figure>



<h3 class="wp-block-heading" id="heading-5-read-about-the-commands-systemctl-vs-service"><strong>Read about the commands systemctl vs service</strong></h3>



<p>The&nbsp;<strong><mark>Service command</mark></strong>&nbsp;looks up the script to run at the path /etc/init.d/SCRIPT. It then runs the script, passing the COMMAND unchanged as the arguments. The&nbsp;<em>service</em>&nbsp;command guarantees a predictable running environment by removing most of the variables and setting the root path as the current working directory.</p>



<p><strong><mark>eg: sudo service jenkins start</mark></strong></p>



<p>The&nbsp;<strong><em><mark>systemctl</mark></em>&nbsp;<mark>command</mark></strong>&nbsp;interacts with the SystemD service manager to manage the services. Contrary to the&nbsp;<em>service</em>&nbsp;command, it manages the services by interacting with the SystemD process instead of running the init script.</p>



<p>To start, stop, and restart a process, we can run the commands with&nbsp;<em>systemctl</em>&nbsp;.</p>



<p><strong><mark>eg: sudo systemctl start docker</mark></strong></p>
<p>The post <a rel="nofollow" href="https://www.abdulrahmanuk.com/day-7-task-understanding-package-manager-and-systemctl/">Day 7 Task &#8211; Understanding package manager and systemctl</a> appeared first on <a rel="nofollow" href="https://www.abdulrahmanuk.com">abdulrahmanuk.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.abdulrahmanuk.com/day-7-task-understanding-package-manager-and-systemctl/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Day 4 &#8211; Basic Linux Shell Scripting for DevOps Engineer</title>
		<link>https://www.abdulrahmanuk.com/day-4-basic-linux-shell-scripting-for-devops-engineer/</link>
					<comments>https://www.abdulrahmanuk.com/day-4-basic-linux-shell-scripting-for-devops-engineer/#respond</comments>
		
		<dc:creator><![CDATA[Abdul Rahman UK]]></dc:creator>
		<pubDate>Wed, 31 May 2023 09:24:53 +0000</pubDate>
				<category><![CDATA[90DaysOfDevOps]]></category>
		<category><![CDATA[devops]]></category>
		<category><![CDATA[linux]]></category>
		<guid isPermaLink="false">https://www.abdulrahmanuk.com/?p=357</guid>

					<description><![CDATA[<p>What is Kernel A kernel is a central component of an operating system that manages system resources and provides a bridge between software applications and the computer&#8217;s hardware. Kernel Allows programs to interact with the computer&#8217;s resources such as the CPU, memory, disk drives, and input/output devices. What is Shell Shell is a special program [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.abdulrahmanuk.com/day-4-basic-linux-shell-scripting-for-devops-engineer/">Day 4 &#8211; Basic Linux Shell Scripting for DevOps Engineer</a> appeared first on <a rel="nofollow" href="https://www.abdulrahmanuk.com">abdulrahmanuk.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p><strong>What is Kernel</strong></p>



<p>A kernel is a central component of an operating system that manages system resources and provides a bridge between software applications and the computer&#8217;s hardware. Kernel Allows programs to interact with the computer&#8217;s resources such as the CPU, memory, disk drives, and input/output devices.</p>



<h4 class="wp-block-heading" id="heading-what-is-shell"><strong>What is Shell</strong></h4>



<p>Shell is a special program that provides a command-line interface (CLI)/ terminal so that users can interact with the operating system through special text commands. A shell allows users to run commands, execute programs, and manipulate files and directories on the system.</p>



<h4 class="wp-block-heading" id="heading-what-is-linux-shell-scripting">What is Linux Shell Scripting</h4>



<p>It&#8217;s a way of writing commands or a set of instructions in a text file to run in a Linux shell/ terminal. For writing shell scripts we can use different scripting languages such as Bash, Zsh, Csh, Ksh, Fish, etc.</p>



<p>Bash: Bash is the default shell in most Linux distributions and is widely used for writing shell scripts.</p>



<h3 class="wp-block-heading" id="heading-what-is-shell-scripting-for-devops">What is Shell Scripting for DevOps</h3>



<p>Shell scripting is used in DevOps to automate tasks and processes for managing the development and deployment of software applications in a fast-paced and dynamic environment.</p>



<p>Here are some examples of how shell scripting is used in DevOps:</p>



<ul class="wp-block-list">
<li>Deployment automation: DevOps teams use shell scripts to automate the deployment of software applications to production, testing, and staging environments. These scripts can automate tasks such as copying files, installing dependencies, setting up servers, configuring databases, and more.</li>



<li>Infrastructure management: DevOps teams use shell scripts to manage infrastructure as code, which allows them to treat infrastructure as if it were software. Shell scripts can be used to automate the provisioning and configuration of servers, load balancers, databases, and other infrastructure components.</li>



<li>Continuous Integration and Continuous Delivery (CI/CD): Shell scripting is used to automate the build, test, and deployment stages of the CI/CD pipeline. This ensures that code changes are thoroughly tested and deployed to production quickly and reliably.</li>



<li>Monitoring and logging: DevOps teams use shell scripts to automate the monitoring and logging of software applications and infrastructure. These scripts can be used to collect performance metrics, log files, and other data that can be used to troubleshoot issues and improve system performance.</li>
</ul>



<p>Overall, shell scripting is a powerful tool to automate repetitive tasks, manage infrastructure as code, and streamline the software development and deployment process</p>



<h3 class="wp-block-heading" id="heading-what-is-binbash">What is #!/bin/bash?</h3>



<p>#!/bin/bash is the shebang line and it is written first at the beginning of the script. It is nothing but the absolute path to the bash interpreter. This line is used to specify the interpreter with which the given script will be run by default.</p>



<p>Syntax of shebang line is #!/bin/&lt;shell_interpreter&gt;</p>



<h3 class="wp-block-heading" id="heading-can-we-write-binsh-as-well">Can we write #!/bin/sh as well?</h3>



<p>Answer is YES</p>



<p>Some of the most common shell interpreters include:</p>



<ul class="wp-block-list">
<li>Bash (Bourne-Again SHell)</li>



<li>sh (Bourne Shell)</li>



<li>csh (C Shell)</li>



<li>tcsh (TENEX C Shell)</li>



<li>zsh (Z Shell)</li>



<li>ksh (KornShell)</li>



<li>fish (Friendly Interactive SHell)</li>
</ul>



<p>Each shell interpreter has its own syntax, features, and capabilities. Bash is a popular shell interpreter in Linux environments and is known for its powerful scripting capabilities.</p>



<h4 class="wp-block-heading" id="heading-write-a-shell-script-that-prints-i-will-complete-the-90daysoofdevops-challenge">Write a Shell Script that prints I will complete the #90DaysOfDevOps challenge</h4>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1430" height="176" src="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-5.png" alt="image 5" class="wp-image-358" title="Day 4 - Basic Linux Shell Scripting for DevOps Engineer 15" srcset="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-5.png 1430w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-5-768x95.png 768w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-5-150x18.png 150w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-5-300x37.png 300w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-5-696x86.png 696w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-5-1068x131.png 1068w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-5-600x74.png 600w" sizes="auto, (max-width: 1430px) 100vw, 1430px" /></figure>



<h4 class="wp-block-heading" id="heading-write-a-shell-script-that-prints-i-will-complete-the-90daysoofdevops-challenge">Write a Shell Script to take user input, input from arguments, and print the variables.<a href="https://90daysofdevopschallenge.hashnode.dev/day04-90daysofdevops-challenge-tws#heading-write-a-shell-script-that-prints-i-will-complete-the-90daysoofdevops-challenge" rel="nofollow noopener" target="_blank"></a></h4>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1732" height="342" src="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-6.png" alt="image 6" class="wp-image-359" title="Day 4 - Basic Linux Shell Scripting for DevOps Engineer 16" srcset="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-6.png 1732w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-6-768x152.png 768w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-6-1536x303.png 1536w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-6-150x30.png 150w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-6-300x59.png 300w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-6-696x137.png 696w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-6-1068x211.png 1068w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-6-600x118.png 600w" sizes="auto, (max-width: 1732px) 100vw, 1732px" /></figure>



<h4 class="wp-block-heading" id="heading-what-is-binbash">Write an example of If else in Shell Scripting for comparing 2 numbers</h4>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" style="font-size:.875rem;--cbp-line-number-color:#a6accd;--cbp-line-number-width:17.8046875px;line-height:1.25rem"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1b1e28"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" data-code="#!/bin/bash 
echo &quot;Just you and Computer number Guess Game!!!&quot;
echo &quot;Please enter your number&quot;
read number

computer=$((1 + RANDOM % 100))
echo &quot;The computer Guess is $computer&quot;

echo &quot;Your choice is $number&quot;

if [ $computer -ge $number ]
then
	echo &quot;Computer won the game&quot;
else 
	echo &quot;You won the GAME!!!&quot;
fi " style="color:#a6accd;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki poimandres" style="background-color: #1b1e28"><code><span class="line"><span style="color: #A6ACCD">#!/bin/bash </span></span>
<span class="line"><span style="color: #A6ACCD">echo </span><span style="color: #A6ACCD">&quot;</span><span style="color: #5DE4C7">Just you and Computer number Guess Game!!!</span><span style="color: #A6ACCD">&quot;</span></span>
<span class="line"><span style="color: #A6ACCD">echo </span><span style="color: #A6ACCD">&quot;</span><span style="color: #5DE4C7">Please enter your number</span><span style="color: #A6ACCD">&quot;</span></span>
<span class="line"><span style="color: #A6ACCD">read number</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A6ACCD">computer=$((</span><span style="color: #5DE4C7">1</span><span style="color: #A6ACCD"> + RANDOM % </span><span style="color: #5DE4C7">100</span><span style="color: #A6ACCD">))</span></span>
<span class="line"><span style="color: #A6ACCD">echo </span><span style="color: #A6ACCD">&quot;</span><span style="color: #5DE4C7">The computer Guess is $computer</span><span style="color: #A6ACCD">&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A6ACCD">echo </span><span style="color: #A6ACCD">&quot;</span><span style="color: #5DE4C7">Your choice is $number</span><span style="color: #A6ACCD">&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A6ACCD">if [ </span><span style="color: #D0679D">$computer</span><span style="color: #A6ACCD"> </span><span style="color: #D0679D">-ge</span><span style="color: #A6ACCD"> </span><span style="color: #D0679D">$number</span><span style="color: #A6ACCD"> ]</span></span>
<span class="line"><span style="color: #A6ACCD">then</span></span>
<span class="line"><span style="color: #A6ACCD">	echo </span><span style="color: #A6ACCD">&quot;</span><span style="color: #5DE4C7">Computer won the game</span><span style="color: #A6ACCD">&quot;</span></span>
<span class="line"><span style="color: #A6ACCD">else </span></span>
<span class="line"><span style="color: #A6ACCD">	echo </span><span style="color: #A6ACCD">&quot;</span><span style="color: #5DE4C7">You won the GAME!!!</span><span style="color: #A6ACCD">&quot;</span></span>
<span class="line"><span style="color: #A6ACCD">fi </span></span></code></pre></div>



<p></p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1532" height="618" src="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-8.png" alt="image 8" class="wp-image-361" title="Day 4 - Basic Linux Shell Scripting for DevOps Engineer 17" srcset="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-8.png 1532w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-8-768x310.png 768w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-8-150x61.png 150w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-8-300x121.png 300w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-8-696x281.png 696w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-8-1068x431.png 1068w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-8-600x242.png 600w" sizes="auto, (max-width: 1532px) 100vw, 1532px" /></figure>



<p></p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1886" height="354" src="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-7.png" alt="image 7" class="wp-image-360" title="Day 4 - Basic Linux Shell Scripting for DevOps Engineer 18" srcset="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-7.png 1886w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-7-768x144.png 768w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-7-1536x288.png 1536w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-7-150x28.png 150w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-7-300x56.png 300w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-7-696x131.png 696w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-7-1068x200.png 1068w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-7-600x113.png 600w" sizes="auto, (max-width: 1886px) 100vw, 1886px" /></figure>



<h4 class="wp-block-heading" id="heading-what-is-binbash">Improve the above script to handle multiple conditions and invalid inputs by the users [ Use if-elif-else-fi ]</h4>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" style="font-size:.875rem;--cbp-line-number-color:#a6accd;--cbp-line-number-width:17.8046875px;line-height:1.25rem"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1b1e28"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" data-code="#!/bin/bash 
echo &quot;Just you and Computer number Guess Game!!!&quot;

echo &quot;Please enter your number&quot;
read number

if ! [[ $number =~ ^[1-9][0-9]?$|^100$ ]]; then
	echo &quot;enter valid number from 1 to 100 only&quot;
	exit 1
fi

computer=$((1 + RANDOM % 100))
echo &quot;The computer Guess is $computer&quot;

echo &quot;Your choice is $number&quot;

if [ $computer -gt $number ]
then
	echo &quot;Computer won the game&quot;
elif [ $number -gt $computer ]; then
	echo &quot;You won the GAME!!!&quot;
else 
	echo &quot;You both are guess same number!!!GREAT!!!&quot;
fi" style="color:#a6accd;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki poimandres" style="background-color: #1b1e28"><code><span class="line"><span style="color: #A6ACCD">#!/bin/bash </span></span>
<span class="line"><span style="color: #A6ACCD">echo </span><span style="color: #A6ACCD">&quot;</span><span style="color: #5DE4C7">Just you and Computer number Guess Game!!!</span><span style="color: #A6ACCD">&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A6ACCD">echo </span><span style="color: #A6ACCD">&quot;</span><span style="color: #5DE4C7">Please enter your number</span><span style="color: #A6ACCD">&quot;</span></span>
<span class="line"><span style="color: #A6ACCD">read number</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A6ACCD">if ! [[ </span><span style="color: #D0679D">$number</span><span style="color: #A6ACCD"> </span><span style="color: #D0679D">=~</span><span style="color: #A6ACCD"> </span><span style="color: #D0679D">^</span><span style="color: #A6ACCD">[</span><span style="color: #5DE4C7">1-9</span><span style="color: #A6ACCD">][</span><span style="color: #5DE4C7">0-9</span><span style="color: #A6ACCD">]</span><span style="color: #D0679D">?$|^</span><span style="color: #5DE4C7">100</span><span style="color: #D0679D">$</span><span style="color: #A6ACCD"> ]]; then</span></span>
<span class="line"><span style="color: #A6ACCD">	echo </span><span style="color: #A6ACCD">&quot;</span><span style="color: #5DE4C7">enter valid number from 1 to 100 only</span><span style="color: #A6ACCD">&quot;</span></span>
<span class="line"><span style="color: #A6ACCD">	exit </span><span style="color: #5DE4C7">1</span></span>
<span class="line"><span style="color: #A6ACCD">fi</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A6ACCD">computer=$((</span><span style="color: #5DE4C7">1</span><span style="color: #A6ACCD"> + RANDOM % </span><span style="color: #5DE4C7">100</span><span style="color: #A6ACCD">))</span></span>
<span class="line"><span style="color: #A6ACCD">echo </span><span style="color: #A6ACCD">&quot;</span><span style="color: #5DE4C7">The computer Guess is $computer</span><span style="color: #A6ACCD">&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A6ACCD">echo </span><span style="color: #A6ACCD">&quot;</span><span style="color: #5DE4C7">Your choice is $number</span><span style="color: #A6ACCD">&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A6ACCD">if [ </span><span style="color: #D0679D">$computer</span><span style="color: #A6ACCD"> </span><span style="color: #D0679D">-gt</span><span style="color: #A6ACCD"> </span><span style="color: #D0679D">$number</span><span style="color: #A6ACCD"> ]</span></span>
<span class="line"><span style="color: #A6ACCD">then</span></span>
<span class="line"><span style="color: #A6ACCD">	echo </span><span style="color: #A6ACCD">&quot;</span><span style="color: #5DE4C7">Computer won the game</span><span style="color: #A6ACCD">&quot;</span></span>
<span class="line"><span style="color: #A6ACCD">elif [ </span><span style="color: #D0679D">$number</span><span style="color: #A6ACCD"> </span><span style="color: #D0679D">-gt</span><span style="color: #A6ACCD"> </span><span style="color: #D0679D">$computer</span><span style="color: #A6ACCD"> ]; then</span></span>
<span class="line"><span style="color: #A6ACCD">	echo </span><span style="color: #A6ACCD">&quot;</span><span style="color: #5DE4C7">You won the GAME!!!</span><span style="color: #A6ACCD">&quot;</span></span>
<span class="line"><span style="color: #A6ACCD">else </span></span>
<span class="line"><span style="color: #A6ACCD">	echo </span><span style="color: #A6ACCD">&quot;</span><span style="color: #5DE4C7">You both are guess same number!!!GREAT!!!</span><span style="color: #A6ACCD">&quot;</span></span>
<span class="line"><span style="color: #A6ACCD">fi</span></span></code></pre></div>



<p></p>



<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" src="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-10.png" alt="image 10" class="wp-image-363" width="703" height="404" title="Day 4 - Basic Linux Shell Scripting for DevOps Engineer 19" srcset="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-10.png 1546w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-10-768x442.png 768w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-10-1536x884.png 1536w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-10-150x86.png 150w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-10-300x173.png 300w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-10-696x401.png 696w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-10-1068x615.png 1068w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-10-600x345.png 600w" sizes="auto, (max-width: 703px) 100vw, 703px" /></figure>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1938" height="512" src="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-9.png" alt="image 9" class="wp-image-362" title="Day 4 - Basic Linux Shell Scripting for DevOps Engineer 20" srcset="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-9.png 1938w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-9-768x203.png 768w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-9-1536x406.png 1536w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-9-150x40.png 150w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-9-300x79.png 300w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-9-696x184.png 696w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-9-1068x282.png 1068w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-9-1920x507.png 1920w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-9-600x159.png 600w" sizes="auto, (max-width: 1938px) 100vw, 1938px" /></figure>



<h4 class="wp-block-heading" id="heading-what-is-binbash">Hope the blog helps you, &nbsp;Follow me for more content on Cloud and DevOps. Thank you! <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f64f.png" alt="🙏" class="wp-smiley" style="height: 1em; max-height: 1em;" /><a href="https://90daysofdevopschallenge.hashnode.dev/day04-90daysofdevops-challenge-tws#heading-what-is-binbash" rel="nofollow noopener" target="_blank"></a></h4>
<p>The post <a rel="nofollow" href="https://www.abdulrahmanuk.com/day-4-basic-linux-shell-scripting-for-devops-engineer/">Day 4 &#8211; Basic Linux Shell Scripting for DevOps Engineer</a> appeared first on <a rel="nofollow" href="https://www.abdulrahmanuk.com">abdulrahmanuk.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.abdulrahmanuk.com/day-4-basic-linux-shell-scripting-for-devops-engineer/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Day 3- Basics of Linux Commands (Part-2)</title>
		<link>https://www.abdulrahmanuk.com/day-3-basics-of-linux-commands-part-2/</link>
					<comments>https://www.abdulrahmanuk.com/day-3-basics-of-linux-commands-part-2/#respond</comments>
		
		<dc:creator><![CDATA[Abdul Rahman UK]]></dc:creator>
		<pubDate>Wed, 31 May 2023 06:48:36 +0000</pubDate>
				<category><![CDATA[90DaysOfDevOps]]></category>
		<guid isPermaLink="false">https://www.abdulrahmanuk.com/?p=348</guid>

					<description><![CDATA[<p>What are Linux Commands The Cat command is used to view the content of the file. It gives content as output. Syntax: cat file_name The&#160;rm&#160;command is used to remove directories and files permanently without moving them to the trash directory. The&#160;rmdir&#160;command removes empty directories. Syntax : rm file_name To create a fruits.txt file and to view the content Add content [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.abdulrahmanuk.com/day-3-basics-of-linux-commands-part-2/">Day 3- Basics of Linux Commands (Part-2)</a> appeared first on <a rel="nofollow" href="https://www.abdulrahmanuk.com">abdulrahmanuk.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>What are Linux Commands</p>



<ol class="wp-block-list">
<li><strong>To view what&#8217;s written in a file.</strong></li>
</ol>



<p>The <strong>Cat</strong> command is used to view the content of the file. It gives content as output.</p>



<p><strong>Syntax</strong>: cat file_name</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="952" height="282" src="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-2.png" alt="image 2" class="wp-image-349" title="Day 3- Basics of Linux Commands (Part-2) 21" srcset="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-2.png 952w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-2-768x227.png 768w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-2-150x44.png 150w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-2-300x89.png 300w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-2-696x206.png 696w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-2-600x178.png 600w" sizes="auto, (max-width: 952px) 100vw, 952px" /></figure>



<ol class="wp-block-list">
<li><strong>To remove a Directory/ File</strong></li>
</ol>



<p>The&nbsp;<strong>rm</strong>&nbsp;command is used to remove directories and files permanently without moving them to the trash directory. The&nbsp;<strong>rmdir</strong>&nbsp;command removes empty directories.</p>



<p><strong>Syntax :</strong> rm file_name</p>



<p><strong>To create a fruits.txt file and to view the content</strong></p>



<pre class="wp-block-code"><code>ubuntu@ip-172-31-205-241:~$ vi fruits.txt
ubuntu@ip-172-31-205-241:~$ cat fruits.txt
Apple
Mango
Banana
Kiwi
Dragan
Guava</code></pre>



<p><strong>Add content in fruits.txt (One in each line) &#8211; Apple, Mango, Banana, Kiwi, Dragan, Guava.</strong></p>



<pre class="wp-block-code"><code> Apple
 Mango
 Banana
 Kiwi
 Dragan
 Guava
 ~
 ~
 ~</code></pre>



<ol class="wp-block-list">
<li>To Show only the top three fruits from the file.To show only the top three fruits we will use the head command. The Linux head command prints the first lines of one or more files to standard output. By default, it shows the first 10 lines. We can pass a -n, where n shows the specified number of line<br><strong>Syntax:</strong> head -n file_name<br></li>



<li><strong>To Show only the bottom three fruits from the file to</strong> show only the bottom three fruits we will use <strong>the tail</strong> command<strong>.</strong> Tail is a command which prints the last few lines (10 lines by default) of a certain file.<br><strong>Syntax:</strong> tail -n file_name</li>
</ol>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1082" height="358" src="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-3.png" alt="image 3" class="wp-image-350" title="Day 3- Basics of Linux Commands (Part-2) 22" srcset="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-3.png 1082w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-3-768x254.png 768w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-3-150x50.png 150w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-3-300x99.png 300w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-3-696x230.png 696w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-3-1068x353.png 1068w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-3-600x199.png 600w" sizes="auto, (max-width: 1082px) 100vw, 1082px" /></figure>



<p><strong>To create another file Colors.txt and to view the content. Commands:</strong> vi Colors.txt cat Colors.txt</p>



<p><strong>Add content in Colors.txt (One in each line) &#8211; Red, Pink, Blue, Orange, Purple, and Wine.</strong></p>



<p><strong>To find the difference between the fruits.txt and Colors.txt files.</strong> To find the difference between the content of two files we can use <strong>the diff</strong> command.</p>



<pre class="wp-block-code"><code> ubuntu@ip-172-31-205-241:~$ diff fruits.txt colors.txt
 1,6c1,6
 &lt; Apple
 &lt; Mango
 &lt; Banana
 &lt; Kiwi
 &lt; Dragan
 &lt; Guava
 ---
 > Red
 > Pink
 > Blue
 > Orange
 > Purple
 > Wine
 ubuntu@ip-172-31-205-241:~$
</code></pre>



<p>1- <strong>echo</strong> – Print any text</p>



<p>ubuntu@ip-172-31-205-241:~$ echo &#8220;Hello World&#8221;<br>Hello World</p>



<p>2- <strong>grep &#8211; Find out the specific word, Find out the root word</strong></p>



<p><strong>Syntax:</strong> grep root /etc/passwd</p>



<pre class="wp-block-code"><code>  ubuntu@ip-172-31-205-241:~$ grep root /etc/passwd
 root:x:0:0:root:/root:/bin/bash</code></pre>



<p>3- <strong>sort &#8211; Set all files in alphabetical order. for this, we use the colors.txt file and set this file alphabetically.</strong></p>



<p><strong>Syntax :</strong> sort colors.txt</p>



<pre class="wp-block-code"><code> ubuntu@ip-172-31-205-241:~$ cat colors.txt
 Red
 Pink
 Blue
 Orange
 Purple
 Wine
 ubuntu@ip-172-31-205-241:~$ sort colors.txt
 Blue
 Orange
 Pink
 Purple
 Red
 Wine
</code></pre>



<p><strong>4- hostname -i:- This command shows IP address of your machine.</strong></p>



<pre class="wp-block-code"><code>ubuntu@ip-172-31-205-241:~$ hostname -i
172.31.205.241
</code></pre>



<p><strong>5- ifconfig &#8211; This command shows details of ip address like netmask, prefix, interface, broadcast</strong></p>



<p><strong>Syntax:</strong> ifconfig</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1434" height="696" src="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-4.png" alt="image 4" class="wp-image-351" title="Day 3- Basics of Linux Commands (Part-2) 23" srcset="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-4.png 1434w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-4-768x373.png 768w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-4-150x73.png 150w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-4-300x146.png 300w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-4-696x338.png 696w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-4-1068x518.png 1068w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-4-600x291.png 600w" sizes="auto, (max-width: 1434px) 100vw, 1434px" /></figure>



<p><strong>How to check the version of our operating system(os)</strong></p>



<p><strong>Syntax:-</strong> cat /etc/os-release</p>



<pre class="wp-block-code"><code>ubuntu@ip-172-31-11-66:~$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.2 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.2 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
ubuntu@ip-172-31-11-66:~$ 
</code></pre>



<ol class="wp-block-list">
<li><strong>How to install the software in Linux</strong><br>when you use this command then all packages are installed in that.<br><strong>Syntax:</strong> yum install httpd -y</li>



<li><strong>We Check service is active or not by using this command</strong><br><strong>Syntax:</strong> service httpd status</li>



<li><strong>The command to activate the service</strong><br><strong>Syntax:</strong> service httpd start</li>



<li><strong>If you want to update the service</strong><br><strong>Syntax:</strong> yum update httpd -y</li>



<li><strong>If you want to remove the service</strong><br><strong>Syntax:</strong> yum remove httpd -y</li>



<li><strong>The command to stop the service</strong><br><strong>Syntax:</strong> service httpd stop</li>



<li><strong>Command to automatically start service in the backend</strong><br><strong>Syntax:</strong> checkconfig httpd on</li>



<li><strong>Command to off service if you have not needed</strong><br><strong>Syntax:</strong> checkconfig httpd off</li>



<li><strong>List of packages that are installed in our machine</strong><br><strong>Syntax: yum list install</strong></li>
</ol>



<p><strong>Thank you for reading! Hope you find this article helpful.</strong></p>
<p>The post <a rel="nofollow" href="https://www.abdulrahmanuk.com/day-3-basics-of-linux-commands-part-2/">Day 3- Basics of Linux Commands (Part-2)</a> appeared first on <a rel="nofollow" href="https://www.abdulrahmanuk.com">abdulrahmanuk.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.abdulrahmanuk.com/day-3-basics-of-linux-commands-part-2/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Day 2 Task: Basics Linux command</title>
		<link>https://www.abdulrahmanuk.com/day-2-task-basics-linux-command/</link>
					<comments>https://www.abdulrahmanuk.com/day-2-task-basics-linux-command/#respond</comments>
		
		<dc:creator><![CDATA[Abdul Rahman UK]]></dc:creator>
		<pubDate>Wed, 31 May 2023 06:13:31 +0000</pubDate>
				<category><![CDATA[90DaysOfDevOps]]></category>
		<category><![CDATA[devops]]></category>
		<category><![CDATA[linux]]></category>
		<guid isPermaLink="false">https://www.abdulrahmanuk.com/?p=343</guid>

					<description><![CDATA[<p>What is Linux? The LINUX is an open-source, It&#8217;s freely available operating system that can be installed on a wide range of devices such as desktops, servers, smartphones, tablets, supercomputers, etc. Linux File System Hierarchy &#8211; In Linux everything is represented as a file including a hardware program the files are stored in a directory [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.abdulrahmanuk.com/day-2-task-basics-linux-command/">Day 2 Task: Basics Linux command</a> appeared first on <a rel="nofollow" href="https://www.abdulrahmanuk.com">abdulrahmanuk.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p><strong>What is Linux?</strong></p>



<p>The LINUX is an open-source, It&#8217;s freely available operating system that can be installed on a wide range of devices such as desktops, servers, smartphones, tablets, supercomputers, etc.</p>



<p><strong>Linux File System Hierarchy &#8211; In </strong>Linux everything is represented as a file including a hardware program the files are stored in a directory and every directory contains a file with a tree structure that is called file system hierarchy.</p>



<ol class="wp-block-list">
<li>/home &#8211; It creates the home directory for the users</li>



<li>/root &#8211; home directory for the root user</li>



<li>/boot &#8211; it contains a bootable file for Linux </li>



<li>/etc &#8211; contains all configuration files</li>



<li>/usr &#8211; by default software installed in this directory </li>



<li>/bin &#8211; it contains commands used by all users </li>



<li>/sbin &#8211; It contains commands only used by the root user </li>



<li> /opt &#8211; optional application software packages </li>



<li>/dev &#8211; essential devices files</li>



<li>/mnt &#8211; temporarily mounted filesystem </li>
</ol>



<p>Features of Linux:</p>



<p>1- Open-Source <br>2- Secure<br>3- Simplified updates for all installed software<br>4- Multiple distribution(Fedora, Ubuntu, Centos, ReHat, Debian)</p>



<p><strong>Basic Linux Commands</strong></p>



<ul class="wp-block-list">
<li>ls / &#8211; your root directory.</li>



<li>ls ~ &#8211; your home directory.</li>



<li>uname : It shows name of kernal (OS).</li>



<li>uname -r : It show version of kernal.</li>



<li>clear :  use for clear screen.</li>



<li>whoami : It shows currently login user name.</li>



<li>date : It shows time and date.</li>



<li>cal : Show this month&#8217;s calendar</li>



<li>history : It show list of previously used command.</li>
</ul>



<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" src="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image.png" alt="image" class="wp-image-344" width="703" height="248" title="Day 2 Task: Basics Linux command 24" srcset="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image.png 888w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-768x272.png 768w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-150x53.png 150w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-300x106.png 300w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-696x246.png 696w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-600x212.png 600w" sizes="auto, (max-width: 703px) 100vw, 703px" /></figure>



<ol class="wp-block-list">
<li><strong>ls</strong>&nbsp;&#8211; The most frequently used command in Linux to list directories</li>



<li><strong>pwd</strong>&nbsp;&#8211; Print working directory command in Linux</li>



<li><strong>cd</strong>&nbsp;&#8211; Linux command to navigate through directories</li>



<li><strong>mkdir</strong>&nbsp;&#8211; Command used to create directories in Linux</li>



<li><strong>cd ..</strong>&nbsp;&#8211; Change the directory to one step back.</li>



<li><strong>cd ../..</strong> &#8211; Change directory to 2 levels back.</li>



<li><strong>mv</strong> &#8211; Move or rename files in Linux</li>
</ol>



<h3 class="wp-block-heading" id="heading-listing-commands"><strong>Listing commands</strong></h3>



<p><strong>ls</strong>&nbsp;&#8211; The most frequently used command in Linux to list directories</p>



<p><strong>ls -a</strong>&nbsp;&#8211; you can see the whole list of files, including the hidden files.</p>



<p><strong>ls -l</strong>&nbsp;&#8211; The ls command will only display the files.</p>



<p><strong>ls -d */ &#8211;</strong>&nbsp;If you only want to display the sub-directories excluding all other files, you can use this command</p>



<p><strong>ls -g &#8211;</strong>&nbsp;If you don&#8217;t want to display the owner information in your list</p>



<p><strong>ls -lg &#8211;</strong>&nbsp;f you don&#8217;t want to display the group information in your list</p>



<p><strong>ls ../ &#8211;</strong> This command contains the list of the parent directory.</p>



<p><strong>Linux Command to Create a Nested Directory :</strong></p>



<p>command to create a nested directory is : mkdir -p A/B/C/D/E</p>



<p><mark>-p</mark>&nbsp;is for no error if existing, make parent directories as needed</p>



<p><mark>tree</mark> command is used to show the nested directory.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="992" height="586" src="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-1.png" alt="image 1" class="wp-image-345" title="Day 2 Task: Basics Linux command 25" srcset="https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-1.png 992w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-1-768x454.png 768w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-1-150x89.png 150w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-1-300x177.png 300w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-1-696x411.png 696w, https://www.abdulrahmanuk.com/wp-content/uploads/2023/05/image-1-600x354.png 600w" sizes="auto, (max-width: 992px) 100vw, 992px" /></figure>



<p>Hope you have found this article very useful, Follow me for more Cloud and DevOps content. Thank you!</p>
<p>The post <a rel="nofollow" href="https://www.abdulrahmanuk.com/day-2-task-basics-linux-command/">Day 2 Task: Basics Linux command</a> appeared first on <a rel="nofollow" href="https://www.abdulrahmanuk.com">abdulrahmanuk.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.abdulrahmanuk.com/day-2-task-basics-linux-command/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Day1: What is DevOps? Why DevOps is Important?</title>
		<link>https://www.abdulrahmanuk.com/day1-what-is-devops-why-devops-is-important/</link>
					<comments>https://www.abdulrahmanuk.com/day1-what-is-devops-why-devops-is-important/#respond</comments>
		
		<dc:creator><![CDATA[Abdul Rahman UK]]></dc:creator>
		<pubDate>Mon, 27 Feb 2023 18:34:21 +0000</pubDate>
				<category><![CDATA[90DaysOfDevOps]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[devops]]></category>
		<category><![CDATA[linux]]></category>
		<guid isPermaLink="false">https://www.abdulrahmanuk.com/?p=323</guid>

					<description><![CDATA[<p>I have accepted a DevOps challenge #90DaysOfDevOps initiated by Shubham Londhe. So today I&#8217;ll be giving an outline of what is DevOps and Important of DevOps. What are Automation, Scaling, and Infrastructure What is DevOps? DevOps is a software development methodology that aims to improve collaboration and communication between development and operations teams. It combines [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.abdulrahmanuk.com/day1-what-is-devops-why-devops-is-important/">Day1: What is DevOps? Why DevOps is Important?</a> appeared first on <a rel="nofollow" href="https://www.abdulrahmanuk.com">abdulrahmanuk.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>I have accepted a DevOps challenge #90DaysOfDevOps initiated by Shubham Londhe.</p>



<p>So today I&#8217;ll be giving an outline of what is DevOps and Important of DevOps. </p>



<p>What are Automation, Scaling, and Infrastructure</p>



<p></p>



<h3 class="wp-block-heading"><strong>What is DevOps?</strong></h3>



<p>DevOps is a software development methodology that aims to improve collaboration and communication between development and operations teams. It combines software development (Dev) with operations (Ops) to create a more streamlined and efficient software development lifecycle.</p>



<p>DevOps emphasizes the automation of processes, continuous integration and delivery, and the use of feedback loops to continually improve software quality. By breaking down silos between development and operations teams, DevOps aims to create a culture of collaboration, where all team members share responsibility for delivering high-quality software.</p>



<p>DevOps also involves the use of tools and technologies to automate tasks such as testing, deployment, and monitoring. This automation helps to reduce the likelihood of human error and enables teams to deploy software more frequently, with greater confidence.</p>



<p>Overall, DevOps is an approach to software development that prioritizes collaboration, automation, and continuous improvement to deliver software faster, more reliably, and with higher quality.</p>



<h3 class="wp-block-heading"><strong>What is Automation</strong></h3>



<p>Automation, scaling, and infrastructure are all important concepts in the field of technology and software development.</p>



<p>Automation refers to the use of tools and technologies to automate repetitive or time-consuming tasks. This can include tasks such as software testing, deployment, and monitoring. By automating these tasks, developers can save time and reduce the likelihood of human error, resulting in faster and more reliable software development.</p>



<h3 class="wp-block-heading"><strong>What is Scaling</strong></h3>



<p>Scaling refers to the ability to increase the capacity of a system to handle more traffic, data, or users. This is often necessary when a software application becomes popular or when an organization&#8217;s needs change over time. Scaling can involve increasing the number of servers, using load-balancing technologies, and optimizing database performance.</p>



<h3 class="wp-block-heading"><strong>What is Infrastructure</strong></h3>



<p>Infrastructure refers to the underlying hardware and software that support an organization&#8217;s software applications. This can include servers, storage systems, networking equipment, and other components. Infrastructure can be managed in-house or outsourced to third-party providers, such as cloud computing platforms.</p>



<p>In combination, automation, scaling, and infrastructure is critical components of modern software development and operations. By automating repetitive tasks, scaling systems to meet changing demands, and managing infrastructure effectively, organizations can deliver high-quality software with greater efficiency and reliability.</p>



<h3 class="wp-block-heading"><strong>Why DevOps is Important</strong></h3>



<p>DevOps is important for a number of reasons:</p>



<ol class="wp-block-list">
<li>Collaboration: DevOps emphasizes collaboration and communication between development and operations teams, which helps to break down silos and promote a culture of shared responsibility. This results in faster feedback loops and improved decision-making, leading to better software outcomes.</li>



<li>Speed: By automating processes and using continuous integration and delivery, DevOps helps to speed up the software development lifecycle. This means that organizations can deliver software more quickly and respond more rapidly to changing business needs.</li>



<li>Quality: DevOps emphasizes testing and monitoring throughout the software development process, which helps to catch bugs and issues earlier in the process. This leads to higher-quality software and fewer defects in production.</li>



<li>Efficiency: By using automation and continuous delivery, DevOps reduces manual effort and saves time. This means that developers can focus on creating value for the business, rather than spending time on repetitive or mundane tasks.</li>



<li>Flexibility: DevOps provides organizations with the flexibility to adapt to changing business needs and market conditions. By using cloud computing and other technologies, organizations can scale up or down quickly, allowing them to respond rapidly to changes in demand.</li>
</ol>



<p>Overall, DevOps is important because it helps organizations to deliver software more quickly, with higher quality, and with greater efficiency. This can provide a competitive advantage in today&#8217;s fast-paced business environment.</p>
<p>The post <a rel="nofollow" href="https://www.abdulrahmanuk.com/day1-what-is-devops-why-devops-is-important/">Day1: What is DevOps? Why DevOps is Important?</a> appeared first on <a rel="nofollow" href="https://www.abdulrahmanuk.com">abdulrahmanuk.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.abdulrahmanuk.com/day1-what-is-devops-why-devops-is-important/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
