<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ubayed Bin Sufian</title>
    <description>The latest articles on DEV Community by Ubayed Bin Sufian (@ubayedbinsufian).</description>
    <link>https://dev.to/ubayedbinsufian</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3496590%2F41f63d8e-df22-495b-a00f-2794cc5aa34f.jpg</url>
      <title>DEV Community: Ubayed Bin Sufian</title>
      <link>https://dev.to/ubayedbinsufian</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ubayedbinsufian"/>
    <language>en</language>
    <item>
      <title>Linux Services Made Simple: Create, Control, and Remove Your First systemd Service</title>
      <dc:creator>Ubayed Bin Sufian</dc:creator>
      <pubDate>Tue, 05 May 2026 18:45:21 +0000</pubDate>
      <link>https://dev.to/ubayedbinsufian/linux-services-made-simple-create-control-and-remove-your-first-systemd-service-3aa2</link>
      <guid>https://dev.to/ubayedbinsufian/linux-services-made-simple-create-control-and-remove-your-first-systemd-service-3aa2</guid>
      <description>&lt;h2&gt;
  
  
  Linux as a service (The simplest Way to Understand It)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A service is just a program that runs in the background&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;systemctl&lt;/code&gt; is the tool to control it&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;systemd&lt;/code&gt; is the system that manages services&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Simple analogy&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Think of a service like a car 🚗:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can start it&lt;/li&gt;
&lt;li&gt;You can stop it&lt;/li&gt;
&lt;li&gt;You can check if it’s running&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The systemd is like the engine that keeps the car running smoothly behind the scenes.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you'll learn
&lt;/h2&gt;

&lt;p&gt;By the end of this, you’ll be able to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create your own service&lt;/li&gt;
&lt;li&gt;Start / stop it using &lt;code&gt;systemctl&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Enable / disable it at boot&lt;/li&gt;
&lt;li&gt;Delete it cleanly (no leftover mess)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 1: Create a simple script
&lt;/h2&gt;

&lt;p&gt;Create a file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;nano ~/my_simple_service.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Paste this content:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="k"&gt;while &lt;/span&gt;&lt;span class="nb"&gt;true
&lt;/span&gt;&lt;span class="k"&gt;do
  &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Hello! Service is running..."&lt;/span&gt;
  &lt;span class="nb"&gt;sleep &lt;/span&gt;5
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save and exit. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Ctrl + O&lt;/code&gt; --&amp;gt; Enter&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Ctrl + X&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Make it executable:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



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

&lt;h2&gt;
  
  
  Step 2: Create a systemd service
&lt;/h2&gt;

&lt;p&gt;Now we tell &lt;strong&gt;systemd&lt;/strong&gt; how to run our script.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;nano /etc/systemd/system/my-simple.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Paste this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;[&lt;/span&gt;Unit]
&lt;span class="nv"&gt;Description&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;My Simple Demo Service

&lt;span class="o"&gt;[&lt;/span&gt;Service]
&lt;span class="nv"&gt;ExecStart&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/home/&lt;span class="nv"&gt;$USER&lt;/span&gt;/my-simple-service.sh
&lt;span class="nv"&gt;Restart&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;always

&lt;span class="o"&gt;[&lt;/span&gt;Install]
&lt;span class="nv"&gt;WantedBy&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;multi-user.target
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 Replace &lt;code&gt;/home/your-username&lt;/code&gt; with your actual username&lt;br&gt;
(Don’t use &lt;code&gt;$USER&lt;/code&gt; here — systemd won’t expand it properly)&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 3: Reload systemd and start the service
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl daemon-reload
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl start my-simple.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  Step 4: Check status
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl status my-simple.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;You should see the service running.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faoptcm5e6v13bz0vgisz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faoptcm5e6v13bz0vgisz.png" alt="Create a systemd service" width="800" height="329"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 5: Stop the service
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl stop my-simple.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgimzjjf5jinknsnfvf43.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgimzjjf5jinknsnfvf43.png" alt="stop the service" width="800" height="196"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 6: Enable / Disable (auto-start on boot)
&lt;/h2&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl &lt;span class="nb"&gt;enable &lt;/span&gt;my-simple.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl disable my-simple.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 7: View logs (while service is running)
&lt;/h2&gt;



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

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;-f&lt;/code&gt; - follow (like &lt;code&gt;tail -f&lt;/code&gt;)&lt;/p&gt;

&lt;p&gt;You should see:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="s2"&gt;"Hello! Service is running..."&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;…repeating every 5 seconds. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa88sts6h2i8i4zx0pghs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa88sts6h2i8i4zx0pghs.png" alt="View logs while service is running" width="800" height="218"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stop the service&lt;/strong&gt;: &lt;code&gt;sudo systemctl stop my-simple.service&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;View logs again&lt;/strong&gt;: &lt;code&gt;sudo journalctl -u my-simple.service&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You will only see past logs (no new updates).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff8xm9ej880ip6pg4mxcp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff8xm9ej880ip6pg4mxcp.png" alt="view logs when service is not running" width="800" height="423"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 8: Clean up (Delete everything properly)
&lt;/h2&gt;

&lt;p&gt;[CAUTION: PLEASE BE CAREFUL WHEN DELETING THE SERVICE FILES SO WE DO NOT DELETE ANY SYSTEM FILES]&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl stop my-simple.service
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl disable my-simple.service
&lt;span class="nb"&gt;sudo rm&lt;/span&gt; /etc/systemd/system/my-simple.service
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl daemon-reload
&lt;span class="nb"&gt;sudo rm&lt;/span&gt; ~/my_simple_service.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now your system is back to a clean state—no leftover services, no hidden issues.&lt;/p&gt;

&lt;p&gt;You just created and managed your first Linux service from scratch 🎉&lt;/p&gt;

&lt;p&gt;This is a small step—but it’s exactly how real-world services (like web servers and databases) are managed in production.&lt;/p&gt;

&lt;h2&gt;
  
  
  Flow Diagram
&lt;/h2&gt;

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

&lt;p&gt;&lt;em&gt;Disclaimer: I have used GH copilot for writing the topics, Gemini Nano Banana for image generation and ChatGPT for the flow diagram and other concepts.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>devops</category>
      <category>systemdesign</category>
      <category>beginners</category>
    </item>
    <item>
      <title>DevOps Prerequisite: Linux Basics You Actually Need</title>
      <dc:creator>Ubayed Bin Sufian</dc:creator>
      <pubDate>Fri, 01 May 2026 01:24:51 +0000</pubDate>
      <link>https://dev.to/ubayedbinsufian/devops-prerequisite-linux-basics-you-actually-need-47pe</link>
      <guid>https://dev.to/ubayedbinsufian/devops-prerequisite-linux-basics-you-actually-need-47pe</guid>
      <description>&lt;p&gt;Most DevOps roadmaps look like a never-ending checklist—tools, technologies, and concepts thrown at you all at once.&lt;/p&gt;

&lt;p&gt;If you're from a non-IT background or just starting out, it is easy to feel stuck thinking: “Where do I even begin?”&lt;/p&gt;

&lt;p&gt;I’ve been there.&lt;/p&gt;

&lt;p&gt;That’s why I’m starting this DevOps Prerequisite series to break things down into simple, practical steps that actually matter.&lt;/p&gt;

&lt;p&gt;In this first part, we will focus on the one skill that quietly powers almost everything in DevOps: &lt;strong&gt;Linux and Vi editor&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Not everything, just the &lt;strong&gt;Linux basics&lt;/strong&gt; you actually need to get started and build confidence.&lt;/p&gt;

&lt;h2&gt;
  
  
  Basic Linux Commands
&lt;/h2&gt;

&lt;p&gt;According to the Stack Overflow Developer Survey 2024, Linux is the most commonly used operating system among developers, and it's also one of the most loved. Most of the industry tools and platforms are built on Linux, making it essential for DevOps professionals to have a good understanding of Linux commands and operations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Shell Types
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Bourne Shell (sh)&lt;/strong&gt;: The original Unix shell, which is still widely used for scripting.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;C Shell (csh/tcsh)&lt;/strong&gt;: Known for its C-like syntax, often used in interactive use.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Z Shell (zsh)&lt;/strong&gt;: An extended version of the Bourne Shell with many improvements, popular among developers for its features and customization options.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bourne Again Shell (bash)&lt;/strong&gt;: The most widely used shell, which is an enhanced version of the Bourne Shell, offering features like command history and job control.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;echo $SHELL&lt;/code&gt; - This command will display the current shell being used.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;echo &amp;lt;message&amp;gt;&lt;/code&gt;: Prints the message to the terminal. Also used to display the value of environment variables. In scripts and configuration files, it can be used to print information or debug messages.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ls&lt;/code&gt;: Lists files and directories.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cd&lt;/code&gt;: Change directory.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;pwd&lt;/code&gt;: Print working directory.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;mkdir&lt;/code&gt;: Create a new directory.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cd new_dir; mkdir sub_dir; pwd&lt;/code&gt;: Multiple commands in one line. &lt;em&gt;;&lt;/em&gt; is used to separate commands, allowing you to execute them sequentially.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;h3&gt;
  
  
  Directory Management
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;To create a dir hierarchy asia/bangladesh/dhaka:

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;mkdir asia&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;mkdir asia/bangladesh&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;mkdir asia/bangladesh/dhaka&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;[To create the dir hierarchy in one line]&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;mkdir -p asia/bangladesh/dhaka&lt;/code&gt; (using &lt;em&gt;-p&lt;/em&gt; flag to create parent directories if they don't exist)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;rm -r asia&lt;/code&gt;: Remove a directory and its contents recursively.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cp -r my_dir /tmp/my_dir_copy&lt;/code&gt;: Copy a directory and its contents recursively.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fotwswlbjayqcxp3xugih.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fotwswlbjayqcxp3xugih.png" alt="Create dir hierarchy in a single command and delete it" width="800" height="241"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;h3&gt;
  
  
  File Management
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;touch file1.txt&lt;/code&gt;: Create an empty file or update the timestamp of an existing file.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cat &amp;gt; file2.txt&lt;/code&gt;:  After running this command, the prompt will appear and you can type the content. Hit the Enter key for a new line and press &lt;code&gt;Ctrl + D&lt;/code&gt; to save and exit.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cat file2.txt&lt;/code&gt;: Display the content of the file.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cp file2.txt dir&lt;/code&gt;: Copy a file to a new location.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;mv dir/file2.txt dir/sub_dir&lt;/code&gt;: Move or rename a file. To rename a file, you can use the same command with the new name in the same directory, e.g., &lt;code&gt;mv file.txt new_file.txt&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;rm my_dir.txt&lt;/code&gt;: Remove a file.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;h3&gt;
  
  
  User Management
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;whoami&lt;/code&gt;: Display the current user.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;id&lt;/code&gt;: Display user ID and group information.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;su username&lt;/code&gt;: Switch to another user account. You will be prompted to enter the password for the specified user. Same machine, different user.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ssh username@hostname&lt;/code&gt;: Connect to a remote server using SSH. You will be prompted to enter the password for the specified user on the remote server. Different machine, login remotely.&lt;/li&gt;
&lt;li&gt;Every linux system has a super user called the &lt;strong&gt;root user&lt;/strong&gt;. The root user has full administrative privileges and can perform any action on the system. In production or enterprise environments, acces to root user is often restricted for security reasons, and users are given specific permissions to perform their tasks. &lt;/li&gt;
&lt;li&gt;If a normal user needs to perform administrative tasks, they can use the &lt;code&gt;sudo&lt;/code&gt; command to execute commands with elevated privileges such as installing software, modifying system configurations, or managing user accounts. The root user can grant them sudo privileges by adding their username into the &lt;strong&gt;/etc/sudoers&lt;/strong&gt; file or by adding them to a group that has sudo privileges (e.g., the "sudo" group on Debian-based systems). Now, the user can run commands with &lt;code&gt;sudo&lt;/code&gt; to perform administrative tasks without needing to log in as the root user. The user needs to enter their own password to confirm the action, and the system will log the command for auditing purposes.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;h3&gt;
  
  
  Download files
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;curl -O https://www.digitalocean.com/robots.txt&lt;/code&gt;: Download a file from the specified URL and save it with the custom name. Without the &lt;em&gt;-o&lt;/em&gt; flag, the content will be displayed in the terminal instead of being saved to a file. &lt;code&gt;curl&lt;/code&gt;; "Client URL".&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;wget https://example.com/file.txt -O file.txt&lt;/code&gt;: Download a file from the specified URL and save it with a custom name. &lt;code&gt;wget&lt;/code&gt;; "World Wide Web get".&lt;/li&gt;
&lt;/ul&gt;

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

&lt;h3&gt;
  
  
  Check OS version
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;ls /etc/*release*&lt;/code&gt;: This command lists the contents of the /etc directory that match the pattern &lt;em&gt;release&lt;/em&gt;, which typically includes files that contain information about the operating system version and distribution. The output may vary depending on the Linux distribution being used, but it often includes files like &lt;code&gt;os-release&lt;/code&gt;, &lt;code&gt;lsb-release&lt;/code&gt;, or &lt;code&gt;redhat-release&lt;/code&gt; that provide details about the OS version, name, and other relevant information.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cat /etc/*release*&lt;/code&gt;: This command displays the contents of the files in the /etc directory that match the pattern &lt;em&gt;release&lt;/em&gt;. These files usually contain information about the operating system version and distribution. By running this command, you can see details such as the OS name, version number, and other relevant information about the Linux distribution you are using.&lt;/li&gt;
&lt;/ul&gt;

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

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

&lt;p&gt;Package managers are tools that automate the process of installing, updating, configuring, and removing software packages on a computer. They help manage dependencies and ensure that the correct versions of software are installed. Different Linux distributions use different package managers. For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Debian-based distributions (like Ubuntu) use &lt;code&gt;apt&lt;/code&gt; (Advanced Package Tool).&lt;/li&gt;
&lt;li&gt;Red Hat-based distributions (like CentOS, Fedora) use &lt;code&gt;yum&lt;/code&gt; or &lt;code&gt;dnf&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Arch Linux uses &lt;code&gt;pacman&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  apt (Advanced Package Tool)
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;apt&lt;/code&gt; is a package manager used in Debian-based Linux distributions that provides a high-level interface for managing software packages. It automatically resolves dependencies and allows you to easily install, update, and remove software packages. For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;apt install package_name&lt;/code&gt;: Install a package along with its dependencies.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;apt remove package_name&lt;/code&gt;: Remove a package.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;apt update&lt;/code&gt;: Update the package index to get the latest information about available packages.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;apt upgrade&lt;/code&gt;: Upgrade all installed packages to their latest versions.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;h4&gt;
  
  
  Red Hat Package Manager (RPM)
&lt;/h4&gt;

&lt;p&gt;A software is bundled into a package file with the .rpm extension. The &lt;code&gt;rpm&lt;/code&gt; command is used to manage these packages, allowing you to install, update, remove, and query software on your system. For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;rpm -i package.rpm&lt;/code&gt;: Install a package.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;rpm -e package_name&lt;/code&gt;: Remove a package.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;rpm -q package_name&lt;/code&gt;: Query if a package is installed. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It does not resolve dependencies automatically, so you may need to manually install any required packages before installing the main package. For example, if you try to install ansible using &lt;code&gt;rpm -i ansible.rpm&lt;/code&gt; and it has dependencies like &lt;code&gt;python3&lt;/code&gt; and &lt;code&gt;python3-pip&lt;/code&gt;, you would need to install those dependencies first before installing ansible.&lt;/p&gt;

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

&lt;h4&gt;
  
  
  yum (Yellowdog Updater, Modified)
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;yum&lt;/code&gt; is a high level package manager used in Red Hat-based Linux distributions that uses RPM under the hood. It automatically resolves dependencies and allows you to easily install, update, and remove software packages. It searches software repositories that act as warehouses containing rpm packages. For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;yum install package_name&lt;/code&gt;: Install a package along with its dependencies.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;yum remove package_name&lt;/code&gt;: Remove a package.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;yum update package_name&lt;/code&gt;: Update a package to the latest version.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;How does yum find where a particular is located?&lt;/em&gt; It looks into the repository configuration files located in &lt;code&gt;/etc/yum.repos.d/&lt;/code&gt; directory. These files contain information about the repositories, including their URLs and the packages they contain. When you run a yum command, it checks these repositories for the requested package and its dependencies, and then downloads and installs them as needed. At times, the default set of repos may not have the software you need or may not have the latest version. So you need to configure additional repositories so yum can find those packages. Instructions to configure additional repositories are usually provided on the software vendor's website. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;yum repolist&lt;/code&gt;: List all configured repositories and their status (enabled/disabled).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ls /etc/yum.repos.d/&lt;/code&gt;: List the repository configuration files in the yum.repos.d directory. Each file corresponds to a repository and contains information about its name, base URL, and other settings. By checking these files, you can see which repositories are configured on your system and where yum will look for packages when you run installation or update commands.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cat /etc/yum.repos.d/&amp;lt;repo_file&amp;gt;.repo&lt;/code&gt;: Display the contents of a specific repository configuration file. This file contains details about the repository, such as its name, base URL, and whether it is enabled or disabled. By examining this file, you can understand where yum will look for packages when you run installation or update commands, and you can also modify the repository settings if needed.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;yum list &amp;lt;package_name&amp;gt;&lt;/code&gt;: Check if a specific package is available in the configured repositories. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;yum --showduplicates list &amp;lt;package_name&amp;gt;&lt;/code&gt;: Check for all available versions of a specific package in the configured repositories. This command will show you all the versions of the package that are available for installation, allowing you to choose which version you want to install or update to.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;h3&gt;
  
  
  Services
&lt;/h3&gt;

&lt;p&gt;Services are background processes that run on a server to provide specific functionality, such as web hosting, database management, or file sharing.&lt;/p&gt;

&lt;p&gt;Once software that runs in the background (e.g., web servers, databases) is installed, it needs to keep running reliably even after a reboot. Services ensure that these programs start automatically and in the correct order. For example, a database service should start before a web server that depends on it. Most background software is configured as a service during installation.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;service &amp;lt;service_name&amp;gt; start&lt;/code&gt;    : Start a service. (old command, still works in some distros)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;systemctl start &amp;lt;service_name&amp;gt;&lt;/code&gt;  : Start a service. (new command, used in most modern distros)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;systemctl stop &amp;lt;service_name&amp;gt;&lt;/code&gt;   : Stop a service.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;systemctl status &amp;lt;service_name&amp;gt;&lt;/code&gt; : Check the status of a service (whether it's running or not).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;systemctl enable &amp;lt;service_name&amp;gt;&lt;/code&gt; : Enable a service to start automatically at boot time.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;systemctl disable &amp;lt;service_name&amp;gt;&lt;/code&gt;: Disable a service from starting automatically at boot time.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  How to configure a software/program as a service?
&lt;/h4&gt;

&lt;p&gt;Most modern Linux distributions use systemd to manage services. Each service is defined using a unit file, which is a configuration file (with a &lt;code&gt;.service&lt;/code&gt; extension) typically located in &lt;code&gt;/etc/systemd/system/&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Steps to configure a software as a systemd service:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a unit file for the service. For example, if you want to create a service for a web application called "myapp", you would create a file named &lt;code&gt;myapp.service&lt;/code&gt; in the &lt;code&gt;/etc/systemd/system/&lt;/code&gt; directory.&lt;/li&gt;
&lt;li&gt;To add additional metadata about the service, such as a description or dependencies, you can include a &lt;code&gt;[Unit]&lt;/code&gt; section in the unit file.&lt;/li&gt;
&lt;li&gt;Define a section caled &lt;code&gt;[Service]&lt;/code&gt; in the unit file, where you specify the command to start the service and directive named &lt;code&gt;ExecStart&lt;/code&gt; to specify the command that will be executed to start the service. If the application has other dependencies, commands or scripts to run before or after starting the main application, you can specify them using directives like &lt;code&gt;ExecStartPre&lt;/code&gt; or &lt;code&gt;ExecStartPost&lt;/code&gt;. If the app needs to be restarted if it crashes, you can use the &lt;code&gt;Restart&lt;/code&gt; directive. &lt;/li&gt;
&lt;li&gt;To configure the service to start automatically at boot time, define a section called &lt;code&gt;[Install]&lt;/code&gt; in the unit file. In this section, you can specify the target that the service should be associated with using the &lt;code&gt;WantedBy&lt;/code&gt; directive. For example, if you want the service to start when the system reaches the multi-user target (which is a common target for services), you would add the following lines to the unit file.&lt;/li&gt;
&lt;li&gt;After defining the &lt;code&gt;[Install]&lt;/code&gt; section, you can enable the service to start at boot time using the &lt;code&gt;systemctl&lt;/code&gt; command: &lt;code&gt;sudo systemctl enable myapp.service&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Save the unit file and reload the systemd manager configuration to recognize the new service: &lt;code&gt;sudo systemctl daemon-reload&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Start the service using the &lt;code&gt;systemctl&lt;/code&gt; command: &lt;code&gt;sudo systemctl start myapp.service&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;Stop the service using the &lt;code&gt;systemctl&lt;/code&gt; command: &lt;code&gt;sudo systemctl stop myapp.service&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Check the status of the service: &lt;code&gt;sudo systemctl status myapp.service&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Unit file contents:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight systemd"&gt;&lt;code&gt;&lt;span class="k"&gt;[Unit]&lt;/span&gt;
&lt;span class="nt"&gt;Description&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;My Web Application Service

&lt;span class="k"&gt;[Service]&lt;/span&gt;
&lt;span class="nt"&gt;ExecStart&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;/usr/bin/python3 /path/to/myapp.py
&lt;span class="nt"&gt;ExecStartPre&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;/usr/bin/echo "Starting myapp service..."
&lt;span class="nt"&gt;ExecStartPost&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;/usr/bin/echo "myapp service started successfully!"
&lt;span class="nt"&gt;Restart&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;always

&lt;span class="k"&gt;[Install]&lt;/span&gt;
&lt;span class="nt"&gt;WantedBy&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;multi-user.target
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;I have written an example blog on configuring a linux service:&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/ubayedbinsufian/linux-services-made-simple-create-control-and-remove-your-first-systemd-service-3mi9-temp-slug-6453320" class="crayons-story__hidden-navigation-link"&gt;Linux Services Made Simple: Create, Control, and Remove Your First systemd Service&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/ubayedbinsufian" class="crayons-avatar  crayons-avatar--l  "&gt;
            &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3496590%2F41f63d8e-df22-495b-a00f-2794cc5aa34f.jpg" alt="ubayedbinsufian profile" class="crayons-avatar__image" width="96" height="96"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/ubayedbinsufian" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Ubayed Bin Sufian
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Ubayed Bin Sufian
                
              
              &lt;div id="story-author-preview-content-3588586" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/ubayedbinsufian" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&gt;
                        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3496590%2F41f63d8e-df22-495b-a00f-2794cc5aa34f.jpg" class="crayons-avatar__image" alt="" width="96" height="96"&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Ubayed Bin Sufian&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/ubayedbinsufian/linux-services-made-simple-create-control-and-remove-your-first-systemd-service-3mi9-temp-slug-6453320" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/ubayedbinsufian/linux-services-made-simple-create-control-and-remove-your-first-systemd-service-3mi9-temp-slug-6453320" id="article-link-3588586"&gt;
          Linux Services Made Simple: Create, Control, and Remove Your First systemd Service
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/linux"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;linux&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/devops"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;devops&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/systemdesign"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;systemdesign&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/beginners"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;beginners&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
            &lt;a href="https://dev.to/ubayedbinsufian/linux-services-made-simple-create-control-and-remove-your-first-systemd-service-3mi9-temp-slug-6453320#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              &lt;span class="hidden s:inline"&gt;Add Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            2 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;/div&gt;
&lt;br&gt;


&lt;h2&gt;
  
  
  Vi Editor
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;vi&lt;/code&gt; is a powerful text editor that is commonly used in Linux environments. In devops and cloud environments, you will often need to edit configuration files, write scripts, or manage code directly on the server. Knowing how to use &lt;code&gt;vi&lt;/code&gt; allows you to efficiently make changes to files without needing a graphical interface, which is especially important when working on remote servers via SSH. vi editor comes by default in most Linux distributions. Types of vi editors:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;vi&lt;/code&gt;: The original version of the editor.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;vim&lt;/code&gt; (Vi IMproved): An enhanced version of vi with additional features and improvements. It is widely used and often the default vi editor in many Linux distributions.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;nvim&lt;/code&gt; (Neovim): A modern fork of vim that aims to improve performance and add new features while maintaining compatibility with vim. It is gaining popularity among developers for its extensibility and improved user experience.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;nano&lt;/code&gt;: A simpler text editor that is easier for beginners to use. It provides a more user-friendly interface compared to vi and vim, making it a good choice for those who are new to command-line text editing.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Basic vi Commands
&lt;/h3&gt;

&lt;p&gt;Vi editor has two main modes: &lt;strong&gt;command mode&lt;/strong&gt; and &lt;strong&gt;insert mode&lt;/strong&gt;. When you open a file in vi, you start in command mode, where you can navigate through the file and execute commands. To edit the file, you need to switch to insert mode. Here are some basic commands to get started with vi editor:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;vi filename&lt;/code&gt;: Open a file in vi editor. This will open the specified file in command mode.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;i&lt;/code&gt;: Switch to insert mode to start editing the file. In insert mode, you can type and make changes to the file. To return to command mode from insert mode, press the &lt;code&gt;Esc&lt;/code&gt; key.&lt;/li&gt;
&lt;li&gt;Use the arrow keys to navigate through the file in command mode. You can also use &lt;code&gt;h&lt;/code&gt;, &lt;code&gt;j&lt;/code&gt;, &lt;code&gt;k&lt;/code&gt;, and &lt;code&gt;l&lt;/code&gt; keys for left, down, up, and right navigation respectively.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;x&lt;/code&gt;: Delete the character under the cursor in command mode.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;dd&lt;/code&gt;: Delete the entire line where the cursor is located in command mode.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;yy&lt;/code&gt;: Copy the entire line where the cursor is located in command mode.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;p&lt;/code&gt;: Paste the copied line below the current line in command mode.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl + u&lt;/code&gt;: Scroll up half a page in command mode.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl + d&lt;/code&gt;: Scroll down half a page in command mode.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;:&lt;/code&gt;: Enter command-line mode in vi editor. In this mode, you can execute various commands to save, quit, or perform other actions on the file.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;:w&lt;/code&gt;: Save the changes made to the file in command-line mode.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;:q&lt;/code&gt;: Quit the vi editor in command-line mode. If you have unsaved changes, it will prompt you to save before quitting.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;:wq&lt;/code&gt;: Save the changes and quit the vi editor in command-line mode.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/search_term&lt;/code&gt;: Search for a specific term in the file in command mode. This will highlight the occurrences of the search term in the file. You can navigate through the search results using &lt;code&gt;n&lt;/code&gt; (next) and &lt;code&gt;N&lt;/code&gt; (previous) commands in command mode.&lt;/li&gt;
&lt;/ul&gt;

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

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

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

&lt;p&gt;This wasn’t about memorizing commands, it was about getting comfortable with the environment where DevOps actually happens.&lt;/p&gt;

&lt;p&gt;If you understand these Linux basics, you’ve already taken a solid first step that many beginners skip.&lt;/p&gt;

&lt;p&gt;In the next part of this series, we’ll move from commands to &lt;strong&gt;hands-on practice&lt;/strong&gt;, you’ll learn how to &lt;strong&gt;build your own lab using VirtualBox&lt;/strong&gt;, so you can experiment, break things, and learn by doing.&lt;/p&gt;

&lt;p&gt;Because DevOps isn’t learned by reading, it’s learned by doing.&lt;/p&gt;

&lt;p&gt;This is part of my DevOps Prerequisite series:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;DevOps Prerequisite #1: Linux Basics You Actually Need (this post)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Build Your Own Lab: Virtualization for DevOps Beginners (next)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Why Vagrant Still Matters (and When It Doesn’t)&lt;/li&gt;
&lt;li&gt;Networking for DevOps: The Only Concepts You Need&lt;/li&gt;
&lt;li&gt;YAML Explained for Future DevOps Engineers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Disclaimer: I have used GH copilot for writing the topics, Gemini Nano Banana for image generation and ChatGPT for the html snippet and other concepts.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reference:&lt;/strong&gt;&lt;br&gt;
💡 Want a visual walkthrough?&lt;br&gt;
This video does a great job explaining the basics covered here. Use it as a supplement—not a replacement:   &lt;iframe src="https://www.youtube.com/embed/Wvf0mBNGjXY?start=2256"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>devops</category>
      <category>linux</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
