<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Linux on D. Sébastien Taggart</title>
    <link>https://www.sebastientaggart.com/tags/linux/</link>
    <description>Recent content in Linux on D. Sébastien Taggart</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Sun, 04 Oct 2026 22:13:05 -0400</lastBuildDate>
    <atom:link href="https://www.sebastientaggart.com/tags/linux/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Setting Up Brazzite for Gaming: Essential Tweaks for Optimal Performance</title>
      <link>https://www.sebastientaggart.com/writing/setting-up-brazzite-for-gaming-essential-tweaks-for-optimal-performance/</link>
      <pubDate>Tue, 03 Dec 2024 17:17:50 -0500</pubDate>
      <guid>https://www.sebastientaggart.com/writing/setting-up-brazzite-for-gaming-essential-tweaks-for-optimal-performance/</guid>
      <description>&lt;p&gt;Brazzite, an emerging Fedora-based Linux distribution, presents an exciting opportunity for gamers seeking a sleek and high-performing system. However, like most Linux environments, it benefits from a few strategic tweaks to enhance your gaming experience. Let’s dive into the essential adjustments that can transform your setup from merely functional to truly optimized.&lt;/p&gt;
&lt;p&gt;Recently, I found myself grappling with a Windows-based gaming system that seemed to thrive on frustration—especially due to the recurring nuisance of forced Windows 11 upgrades. With an M.2 SSD upgrade on my to-do list, I decided it was time to explore Linux gaming.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Brazzite, an emerging Fedora-based Linux distribution, presents an exciting opportunity for gamers seeking a sleek and high-performing system. However, like most Linux environments, it benefits from a few strategic tweaks to enhance your gaming experience. Let’s dive into the essential adjustments that can transform your setup from merely functional to truly optimized.</p>
<p>Recently, I found myself grappling with a Windows-based gaming system that seemed to thrive on frustration—especially due to the recurring nuisance of forced Windows 11 upgrades. With an M.2 SSD upgrade on my to-do list, I decided it was time to explore Linux gaming.</p>
<p>My initial inclination was to install SteamOS, but I quickly discovered that while it supports the Steam Deck, it doesn’t officially cater to the diverse landscape of PCs. The only available image I stumbled upon was dated back to 2021 and unofficial.</p>
<p>In my search for alternatives, Brazzite emerged as a promising contender. After running it for about a week as a dedicated &ldquo;Steam Gaming Client,&rdquo; I can confidently say it’s been a rewarding experience—albeit with a few minor hiccups. Here are my insights and the tweaks that made a difference.</p>
<hr>
<h3 id="1-hide-the-mouse-pointer">1. Hide the Mouse Pointer</h3>
<p>By default, Brazzite keeps the mouse pointer visible at all times, even when you’re immersed in Steam or a game. For an HTPC setup where a traditional keyboard and mouse aren’t in play, this can be cumbersome. Enter <code>unclutter</code>, or rather its Fedora counterpart, <code>unclutter-xfixes</code>, which cleverly hides the mouse pointer until it’s moved.</p>
<h4 id="install-unclutter-xfixes">Install <code>unclutter-xfixes</code></h4>
<ol>
<li>
<p><strong>Install from the repository</strong> (the smoothest method):</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo dnf install unclutter-xfixes
</span></span></code></pre></div></li>
<li>
<p><strong>Run on Startup</strong>: Create a systemd service file for <code>unclutter-xfixes</code>:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">nano ~/.config/systemd/user/unclutter.service
</span></span></code></pre></div><p>Add the following:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-ini" data-lang="ini"><span class="line"><span class="cl"><span class="k">[Unit]</span>
</span></span><span class="line"><span class="cl"><span class="na">Description</span><span class="o">=</span><span class="s">Run unclutter-xfixes</span>
</span></span><span class="line"><span class="cl"><span class="na">After</span><span class="o">=</span><span class="s">graphical.target</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="k">[Service]</span>
</span></span><span class="line"><span class="cl"><span class="na">ExecStart</span><span class="o">=</span><span class="s">/usr/local/bin/unclutter -root -idle 5</span>
</span></span><span class="line"><span class="cl"><span class="na">Restart</span><span class="o">=</span><span class="s">always</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="k">[Install]</span>
</span></span><span class="line"><span class="cl"><span class="na">WantedBy</span><span class="o">=</span><span class="s">default.target</span>
</span></span></code></pre></div></li>
<li>
<p>Enable the service:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">systemctl --user <span class="nb">enable</span> unclutter.service --now
</span></span></code></pre></div></li>
</ol>
<h4 id="alternative-xbanish">Alternative: <code>xbanish</code></h4>
<p>If you prefer hiding the cursor only when typing, you can install <code>xbanish</code>:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo dnf install xbanish
</span></span><span class="line"><span class="cl">xbanish
</span></span></code></pre></div><hr>
<h3 id="2-install-and-configure-mangohud">2. Install and Configure MangoHUD</h3>
<p>To keep a watchful eye on CPU and GPU usage, temperatures, and FPS, MangoHUD is your go-to tool. However, it doesn’t run globally by default; you’ll need to prepend <code>MANGOHUD=1</code> before launching each game. While this is manageable through the Steam interface, I sought a more universal solution.</p>
<h4 id="install-mangohud">Install MangoHUD:</h4>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo dnf install mangohud
</span></span></code></pre></div><h4 id="enable-globally-for-steam-games">Enable Globally for Steam Games:</h4>
<ol>
<li>
<p>Edit Steam’s autostart configuration:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">nano ~/.config/autostart/steam.desktop
</span></span></code></pre></div></li>
<li>
<p>Modify the <code>Exec</code> line to include MangoHUD:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-ini" data-lang="ini"><span class="line"><span class="cl"><span class="na">Exec</span><span class="o">=</span><span class="s">env MANGOHUD=1 steam</span>
</span></span></code></pre></div></li>
<li>
<p>Save your changes and restart Steam.</p>
</li>
</ol>
<h4 id="test-mangohud">Test MangoHUD:</h4>
<p>Launch a game from Steam, and you should see the HUD overlay. If you wish to customize the display, you can edit:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">nano ~/.config/MangoHud/MangoHud.conf
</span></span></code></pre></div><hr>
<h3 id="3-update-firmware-on-xbox-controllers-and-connect-via-bluetooth">3. Update Firmware on Xbox Controllers and Connect via Bluetooth</h3>
<p>I nearly threw in the towel on Brazzite when my older Xbox controllers wouldn’t connect—flashing lights but no solid connection. The breakthrough came when I connected them via USB one at a time to update their firmware. After that, they paired seamlessly.</p>
<h4 id="update-firmware">Update Firmware:</h4>
<ol>
<li>Connect the controller to a Windows machine.</li>
<li>Download and install the <strong>Xbox Accessories</strong> app from the Microsoft Store.</li>
<li>Follow the prompts to update the firmware.</li>
</ol>
<h4 id="connect-to-brazzite">Connect to Brazzite:</h4>
<p>Before diving into these steps, it’s wise to attempt connecting your controllers through the standard Bluetooth GUI interface first. I made the mistake of skipping this and was pleasantly surprised when it worked post-firmware update.</p>
<ol>
<li>
<p>Install <code>bluetoothctl</code>:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo dnf install bluez bluez-tools
</span></span><span class="line"><span class="cl">sudo systemctl start bluetooth
</span></span><span class="line"><span class="cl">sudo systemctl <span class="nb">enable</span> bluetooth
</span></span></code></pre></div></li>
<li>
<p>Pair and connect the controller:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">bluetoothctl
</span></span><span class="line"><span class="cl">power on
</span></span><span class="line"><span class="cl">scan on
</span></span><span class="line"><span class="cl">pair &lt;MAC_ADDRESS&gt;
</span></span><span class="line"><span class="cl">trust &lt;MAC_ADDRESS&gt;
</span></span><span class="line"><span class="cl">connect &lt;MAC_ADDRESS&gt;
</span></span></code></pre></div><p>Replace <code>&lt;MAC_ADDRESS&gt;</code> with your controller’s Bluetooth address.</p>
</li>
</ol>
<hr>
<h3 id="4-kill-a-crashed-game">4. Kill a Crashed Game</h3>
<p>Adjusting from Windows means learning a new way to address a crashed or unresponsive game. Here’s how to handle it in Brazzite:</p>
<h4 id="quick-methods">Quick Methods:</h4>
<ul>
<li>
<p><strong>Graphical</strong>: Use the System Monitor (GNOME System Monitor or KDE’s KSysGuard) to find and kill the game process.</p>
</li>
<li>
<p><strong>Terminal</strong>:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">pkill -9 &lt;game_name&gt;
</span></span></code></pre></div><p>Replace <code>&lt;game_name&gt;</code> with the executable name.</p>
</li>
<li>
<p><strong>xkill</strong>: Install <code>xkill</code> and click on the frozen window:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo dnf install xorg-x11-utils
</span></span><span class="line"><span class="cl">xkill
</span></span></code></pre></div></li>
</ul>
<hr>
<h3 id="5-set-a-timeout-for-bluetooth-controller-sleep">5. Set a Timeout for Bluetooth Controller Sleep</h3>
<p>To avoid the inconvenience of frequently replacing batteries, you can set a timeout for your Bluetooth controllers.</p>
<h4 id="custom-script"><strong>Custom Script</strong>:</h4>
<ol>
<li>Create a script:
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">nano ~/controller_timeout.sh
</span></span></code></pre></div></li>
<li>Add the following:
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="cp">#!/bin/bash
</span></span></span><span class="line"><span class="cl"><span class="nv">MAC_ADDRESS</span><span class="o">=</span><span class="s2">&#34;AA:BB:CC:DD:EE:FF&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nv">TIMEOUT</span><span class="o">=</span><span class="m">600</span>  <span class="c1"># Timeout in seconds</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="k">while</span> true<span class="p">;</span> <span class="k">do</span>
</span></span><span class="line"><span class="cl">    <span class="nv">IDLE_TIME</span><span class="o">=</span><span class="k">$(</span>cat /sys/class/bluetooth/hci0/dev_<span class="nv">$MAC_ADDRESS</span>/idle_timeout<span class="k">)</span>
</span></span><span class="line"><span class="cl">    <span class="k">if</span> <span class="o">[</span> <span class="s2">&#34;</span><span class="nv">$IDLE_TIME</span><span class="s2">&#34;</span> -gt <span class="s2">&#34;</span><span class="nv">$TIMEOUT</span><span class="s2">&#34;</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span>
</span></span><span class="line"><span class="cl">        hcitool dc <span class="nv">$MAC_ADDRESS</span>
</span></span><span class="line"><span class="cl">    <span class="k">fi</span>
</span></span><span class="line"><span class="cl">    sleep <span class="m">60</span>
</span></span><span class="line"><span class="cl"><span class="k">done</span>
</span></span></code></pre></div></li>
<li>Make it executable and run it on startup:
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">chmod +x ~/controller_timeout.sh
</span></span></code></pre></div></li>
</ol>
<hr>
<h3 id="final-thoughts">Final Thoughts</h3>
<p>With these adjustments, your Brazzite system is primed for an engaging gaming experience. From managing overlays with MangoHUD to optimizing controller connectivity and recovery from crashes, these tweaks ensure you can focus on what truly matters: enjoying your games.</p>
<p><strong>Happy Gaming!</strong></p>
]]></content:encoded>
    </item>
    <item>
      <title>Unraveling Linux: A Guide to Counting Directories</title>
      <link>https://www.sebastientaggart.com/writing/unraveling-linux-a-guide-to-count-directories/</link>
      <pubDate>Sun, 07 Aug 2022 07:44:09 -0500</pubDate>
      <guid>https://www.sebastientaggart.com/writing/unraveling-linux-a-guide-to-count-directories/</guid>
      <description>&lt;p&gt;Counting directories in Linux can be a straightforward task, yet there’s beauty in understanding the underlying mechanics. Let’s explore two effective methods, each with its own strengths.&lt;/p&gt;
&lt;h2 id=&#34;method-1-using-ls-and-wc--l&#34;&gt;Method 1: Using &lt;code&gt;ls&lt;/code&gt; and &lt;code&gt;wc -l&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;First up is a classic approach: the &lt;code&gt;ls&lt;/code&gt; command combined with &lt;code&gt;wc -l&lt;/code&gt;. This sequence, &lt;code&gt;ls -d */ | wc -l&lt;/code&gt;, provides a simple way to count directories in your current working directory.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;How it works:&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ls -d */&lt;/code&gt; lists all directories (the &lt;code&gt;-d&lt;/code&gt; flag ensures we only see directories and not their contents).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;wc -l&lt;/code&gt; counts the number of lines in the output, which corresponds to the number of directories listed.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Before you run this command, make sure you&amp;rsquo;re in the right directory. Once executed, the terminal will return a single number, representing the count of directories at your current level.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Counting directories in Linux can be a straightforward task, yet there’s beauty in understanding the underlying mechanics. Let’s explore two effective methods, each with its own strengths.</p>
<h2 id="method-1-using-ls-and-wc--l">Method 1: Using <code>ls</code> and <code>wc -l</code></h2>
<p>First up is a classic approach: the <code>ls</code> command combined with <code>wc -l</code>. This sequence, <code>ls -d */ | wc -l</code>, provides a simple way to count directories in your current working directory.</p>
<ul>
<li><strong>How it works:</strong>
<ul>
<li><code>ls -d */</code> lists all directories (the <code>-d</code> flag ensures we only see directories and not their contents).</li>
<li><code>wc -l</code> counts the number of lines in the output, which corresponds to the number of directories listed.</li>
</ul>
</li>
</ul>
<p>Before you run this command, make sure you&rsquo;re in the right directory. Once executed, the terminal will return a single number, representing the count of directories at your current level.</p>
<h2 id="method-2-using-find">Method 2: Using <code>find</code></h2>
<p>If you’re looking for a more comprehensive solution that includes subdirectories, the <code>find</code> command is your ally. The command <code>find . -type d | wc -l</code> does just that.</p>
<ul>
<li><strong>Breaking it down:</strong>
<ul>
<li><code>find .</code> tells the system to start searching in the current directory.</li>
<li>The <code>-type d</code> option restricts the search to directories only.</li>
<li>Again, <code>wc -l</code> counts the results.</li>
</ul>
</li>
</ul>
<p>If you wish to count directories in a different location, simply replace the <code>.</code> with your desired path. For example, <code>find /home/myfiles -type d | wc -l</code> will count all directories within <code>/home/myfiles</code>, including its subdirectories.</p>
<h2 id="final-thoughts">Final Thoughts</h2>
<p>Counting directories may seem like a small task, but it’s a reflection of how we interact with our systems. Each method has its place, depending on whether you need a quick glance or a deeper dive into your directory structure.</p>
<p>As you explore these commands, consider how they fit into the larger context of your Linux experience. This knowledge can empower you to navigate and manage your file systems with greater confidence.</p>
<p>Now, go ahead and count those directories! Each one is a step in your journey through the vast landscape of Linux.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Top 30 Most Used and Useful Linux Commands: A Comprehensive Guide</title>
      <link>https://www.sebastientaggart.com/writing/top-30-most-useful-terminal-commands-every-developer-should-know/</link>
      <pubDate>Tue, 01 Feb 2022 20:09:38 -0500</pubDate>
      <guid>https://www.sebastientaggart.com/writing/top-30-most-useful-terminal-commands-every-developer-should-know/</guid>
      <description>&lt;p&gt;Linux is more than just an operating system; it&amp;rsquo;s a powerful tool that grants you unparalleled control and flexibility through its command-line interface. Mastering Linux commands can significantly enhance your interaction with the system, enabling efficient file management, system monitoring, and smooth network operations. In this guide, we’ll explore the top 30 most commonly used and useful Linux commands, complete with examples and practical use cases.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&#34;1&#34;&gt;&lt;strong&gt;1. &lt;code&gt;ls&lt;/code&gt; - List Directory Contents&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Think of this command as your digital filing cabinet. It displays the contents of a directory.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Linux is more than just an operating system; it&rsquo;s a powerful tool that grants you unparalleled control and flexibility through its command-line interface. Mastering Linux commands can significantly enhance your interaction with the system, enabling efficient file management, system monitoring, and smooth network operations. In this guide, we’ll explore the top 30 most commonly used and useful Linux commands, complete with examples and practical use cases.</p>
<hr>
<h2 id="1"><strong>1. <code>ls</code> - List Directory Contents</strong></h2>
<p>Think of this command as your digital filing cabinet. It displays the contents of a directory.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">ls
</span></span><span class="line"><span class="cl">ls -l    <span class="c1"># Long format with details</span>
</span></span><span class="line"><span class="cl">ls -a    <span class="c1"># Includes hidden files</span>
</span></span><span class="line"><span class="cl">ls -lh   <span class="c1"># Human-readable file sizes</span>
</span></span></code></pre></div><p><strong>Use Case</strong>: Use <code>ls</code> to quickly check the contents of your home directory and identify file sizes or permissions.</p>
<hr>
<h2 id="2"><strong>2. <code>cd</code> - Change Directory</strong></h2>
<p>Changing directories is like navigating through folders in a filing system.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">cd</span> /var/log   <span class="c1"># Navigate to /var/log</span>
</span></span><span class="line"><span class="cl"><span class="nb">cd</span> ~          <span class="c1"># Return to home directory</span>
</span></span><span class="line"><span class="cl"><span class="nb">cd</span> ../        <span class="c1"># Move up one directory</span>
</span></span></code></pre></div><p><strong>Use Case</strong>: Seamlessly navigate your project folders while coding.</p>
<hr>
<h2 id="3"><strong>3. <code>pwd</code> - Print Working Directory</strong></h2>
<p>This command tells you exactly where you are in the directory structure.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">pwd</span>
</span></span></code></pre></div><p><strong>Use Case</strong>: Confirm your current directory path before running file operations; it’s your GPS in the Linux landscape.</p>
<hr>
<h2 id="4"><strong>4. <code>cp</code> - Copy Files and Directories</strong></h2>
<p>Copying files is like making duplicates of essential documents.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">cp file1.txt /backup/             <span class="c1"># Copy file1.txt to /backup</span>
</span></span><span class="line"><span class="cl">cp -r /source_dir /destination    <span class="c1"># Copy entire directory</span>
</span></span></code></pre></div><p><strong>Use Case</strong>: Create backups of configuration files before making changes, ensuring you have a safety net.</p>
<hr>
<h2 id="5"><strong>5. <code>mv</code> - Move or Rename Files</strong></h2>
<p>This command is your organization tool—move or rename files as needed.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">mv file1.txt /backup/          <span class="c1"># Move file</span>
</span></span><span class="line"><span class="cl">mv oldname.txt newname.txt     <span class="c1"># Rename file</span>
</span></span></code></pre></div><p><strong>Use Case</strong>: Organize files by moving them into categorized folders, keeping your workspace tidy.</p>
<hr>
<h2 id="6"><strong>6. <code>rm</code> - Remove Files or Directories</strong></h2>
<p>Think of <code>rm</code> as your digital eraser, but use it cautiously.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">rm file1.txt           <span class="c1"># Delete a single file</span>
</span></span><span class="line"><span class="cl">rm -r /old_dir         <span class="c1"># Delete directory recursively</span>
</span></span><span class="line"><span class="cl">rm -i file2.txt        <span class="c1"># Interactive confirmation</span>
</span></span></code></pre></div><p><strong>Use Case</strong>: Clear out unnecessary logs or files to free up disk space. Remember, this action is often irreversible.</p>
<hr>
<h2 id="7"><strong>7. <code>touch</code> - Create Empty Files</strong></h2>
<p>A quick way to create placeholder files during development.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">touch newfile.txt
</span></span></code></pre></div><p><strong>Use Case</strong>: Use <code>touch</code> to create files you plan to populate later, minimizing clutter in your workflow.</p>
<hr>
<h2 id="8"><strong>8. <code>cat</code> - Concatenate and View Files</strong></h2>
<p>This command lets you read files as if flipping through a book.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">cat file1.txt
</span></span><span class="line"><span class="cl">cat file1.txt file2.txt &gt; merged.txt    <span class="c1"># Combine files</span>
</span></span></code></pre></div><p><strong>Use Case</strong>: Read small log files directly in the terminal without opening a full editor.</p>
<hr>
<h2 id="9"><strong>9. <code>echo</code> - Print Text to Terminal</strong></h2>
<p>Outputting text is like having a conversation with your terminal.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">echo</span> <span class="s2">&#34;Hello, World!&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nb">echo</span> <span class="s2">&#34;export PATH=</span><span class="nv">$PATH</span><span class="s2">:/new/path&#34;</span> &gt;&gt; ~/.bashrc
</span></span></code></pre></div><p><strong>Use Case</strong>: Append environment variables or debug scripts by printing messages to the terminal.</p>
<hr>
<h2 id="10"><strong>10. <code>nano</code> - Text Editor</strong></h2>
<p>This is your friendly text editor right in the terminal.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">nano file1.txt
</span></span></code></pre></div><p><strong>Use Case</strong>: Edit configuration files without leaving the terminal; quick and efficient.</p>
<hr>
<h2 id="11"><strong>11. <code>vim</code> - Advanced Text Editor</strong></h2>
<p>For those who want more control, <code>vim</code> is like giving your text editing skills a turbo boost.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">vim file1.txt
</span></span></code></pre></div><p><strong>Use Case</strong>: Efficiently edit multiple files in a coding project, especially when precision is key.</p>
<hr>
<h2 id="12"><strong>12. <code>chmod</code> - Change File Permissions</strong></h2>
<p>Modifying file permissions is essential for security and functionality.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">chmod <span class="m">755</span> script.sh      <span class="c1"># Owner can read, write, execute; others read/execute</span>
</span></span><span class="line"><span class="cl">chmod +x script.sh       <span class="c1"># Add execute permission</span>
</span></span></code></pre></div><p><strong>Use Case</strong>: Make a script executable before running it; permissions matter.</p>
<hr>
<h2 id="13"><strong>13. <code>chown</code> - Change File Ownership</strong></h2>
<p>This command helps you assign ownership of files, akin to signing a document.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">chown user:group file1.txt
</span></span></code></pre></div><p><strong>Use Case</strong>: Ensure the right users have access to the necessary files, maintaining security and order.</p>
<hr>
<h2 id="14"><strong>14. <code>find</code> - Locate Files</strong></h2>
<p>Searching for files is like using a map to locate buried treasure.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">find /home -name <span class="s2">&#34;*.txt&#34;</span>   <span class="c1"># Find all .txt files</span>
</span></span><span class="line"><span class="cl">find /var -type d          <span class="c1"># Find all directories in /var</span>
</span></span></code></pre></div><p><strong>Use Case</strong>: Locate configuration files buried in complex directory structures, saving time and effort.</p>
<hr>
<h2 id="15"><strong>15. <code>grep</code> - Search Within Files</strong></h2>
<p>This command is your magnifying glass for text searches.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">grep <span class="s2">&#34;error&#34;</span> /var/log/syslog
</span></span><span class="line"><span class="cl">grep -i <span class="s2">&#34;warning&#34;</span> log.txt    <span class="c1"># Case-insensitive search</span>
</span></span></code></pre></div><p><strong>Use Case</strong>: Quickly identify errors in logs, enhancing troubleshooting efficiency.</p>
<hr>
<h2 id="16"><strong>16. <code>tar</code> - Archive Files</strong></h2>
<p>Creating archives is like filing documents into a neat box.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">tar -cvf archive.tar /folder      <span class="c1"># Create an archive</span>
</span></span><span class="line"><span class="cl">tar -xvf archive.tar             <span class="c1"># Extract an archive</span>
</span></span><span class="line"><span class="cl">tar -czvf archive.tar.gz /folder <span class="c1"># Compress with gzip</span>
</span></span></code></pre></div><p><strong>Use Case</strong>: Backup project directories into a single archive, making it easier to manage.</p>
<hr>
<h2 id="17"><strong>17. <code>zip</code> and <code>unzip</code> - Compress and Extract Files</strong></h2>
<p>Compressing files is akin to packing for a trip—get everything into a manageable size.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">zip -r archive.zip /folder
</span></span><span class="line"><span class="cl">unzip archive.zip
</span></span></code></pre></div><p><strong>Use Case</strong>: Share files in a universally accessible format, ensuring compatibility.</p>
<hr>
<h2 id="18"><strong>18. <code>df</code> - Disk Usage</strong></h2>
<p>This command provides a snapshot of your disk space usage.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">df -h    <span class="c1"># Human-readable format</span>
</span></span></code></pre></div><p><strong>Use Case</strong>: Monitor available space on mounted filesystems to avoid running out of room.</p>
<hr>
<h2 id="19"><strong>19. <code>du</code> - Directory Usage</strong></h2>
<p>Understanding how much space directories consume is crucial for optimization.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">du -sh /folder
</span></span><span class="line"><span class="cl">du -h --max-depth<span class="o">=</span><span class="m">1</span> /folder
</span></span></code></pre></div><p><strong>Use Case</strong>: Identify large directories hogging disk space, helping you to plan your storage needs.</p>
<hr>
<h2 id="20"><strong>20. <code>ps</code> - Process Status</strong></h2>
<p>This command gives you a real-time view of running processes.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">ps aux       <span class="c1"># Detailed process list</span>
</span></span><span class="line"><span class="cl">ps -ef       <span class="c1"># Full process tree</span>
</span></span></code></pre></div><p><strong>Use Case</strong>: Troubleshoot system performance issues by monitoring active processes.</p>
<hr>
<h2 id="21"><strong>21. <code>top</code> and <code>htop</code> - Process Monitoring</strong></h2>
<p>Monitoring processes is like keeping an eye on the heartbeat of your system.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">top
</span></span><span class="line"><span class="cl">htop   <span class="c1"># Requires installation</span>
</span></span></code></pre></div><p><strong>Use Case</strong>: Monitor CPU and memory usage in real-time, allowing for proactive management.</p>
<hr>
<h2 id="22"><strong>22. <code>kill</code> - Terminate Processes</strong></h2>
<p>Sometimes, processes need to be stopped, much like pausing a movie.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">kill</span> <span class="m">1234</span>          <span class="c1"># Kill process with PID 1234</span>
</span></span><span class="line"><span class="cl"><span class="nb">kill</span> -9 <span class="m">1234</span>       <span class="c1"># Force kill</span>
</span></span></code></pre></div><p><strong>Use Case</strong>: Stop unresponsive applications quickly, maintaining system responsiveness.</p>
<hr>
<h2 id="23"><strong>23. <code>wget</code> - Download Files</strong></h2>
<p>Downloading files directly to your server is like sending an assistant to fetch documents.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">wget https://example.com/file.zip
</span></span></code></pre></div><p><strong>Use Case</strong>: Download large files directly to a server without needing a browser.</p>
<hr>
<h2 id="24"><strong>24. <code>curl</code> - Transfer Data</strong></h2>
<p>Using <code>curl</code> is like sending a paper airplane to fetch information from the web.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">curl https://example.com
</span></span><span class="line"><span class="cl">curl -O https://example.com/file.zip
</span></span></code></pre></div><p><strong>Use Case</strong>: Fetch data from APIs or download files efficiently.</p>
<hr>
<h2 id="25"><strong>25. <code>scp</code> - Secure Copy</strong></h2>
<p>Transferring files securely is akin to sending a package with a trusted courier.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">scp file1.txt user@remote:/path/to/destination
</span></span></code></pre></div><p><strong>Use Case</strong>: Copy files to a remote server securely, ensuring data integrity.</p>
<hr>
<h2 id="26"><strong>26. <code>rsync</code> - Synchronize Files</strong></h2>
<p>Rsync is like a highly efficient moving truck, syncing files or directories between systems.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">rsync -av /source /destination
</span></span><span class="line"><span class="cl">rsync -azP /source user@remote:/destination
</span></span></code></pre></div><p><strong>Use Case</strong>: Create incremental backups of critical files, optimizing storage and time.</p>
<hr>
<h2 id="27"><strong>27. <code>ssh</code> - Secure Shell</strong></h2>
<p>Connecting to remote systems securely is like unlocking a door to your virtual office.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">ssh user@remote
</span></span></code></pre></div><p><strong>Use Case</strong>: Manage remote servers securely, ensuring safe and effective control.</p>
<hr>
<h2 id="28"><strong>28. <code>systemctl</code> - Manage Services</strong></h2>
<p>Managing services in systemd-based systems is like conducting an orchestra.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">systemctl start nginx
</span></span><span class="line"><span class="cl">systemctl stop nginx
</span></span><span class="line"><span class="cl">systemctl status nginx
</span></span></code></pre></div><p><strong>Use Case</strong>: Manage and monitor system services effectively, ensuring everything runs smoothly.</p>
<hr>
<h2 id="29"><strong>29. <code>passwd</code> - Change Passwords</strong></h2>
<p>Updating passwords is essential for maintaining security, much like changing the locks on your doors.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">passwd           <span class="c1"># Change current user’s password</span>
</span></span><span class="line"><span class="cl">sudo passwd user <span class="c1"># Change another user’s password</span>
</span></span></code></pre></div><p><strong>Use Case</strong>: Update passwords securely, maintaining system integrity.</p>
<hr>
<h2 id="30"><strong>30. <code>man</code> - Manual Pages</strong></h2>
<p>Accessing manual pages is like having a detailed instruction manual at your fingertips.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">man ls
</span></span><span class="line"><span class="cl">man tar
</span></span></code></pre></div><p><strong>Use Case</strong>: Learn options and usage for any command, deepening your understanding as you go.</p>
<hr>
<h3 id="conclusion">Conclusion</h3>
<p>These 30 commands form the backbone of Linux proficiency, whether you&rsquo;re just starting or are an experienced administrator. By mastering them, you can navigate, manage, and troubleshoot Linux systems with confidence and efficiency. With practical examples and insights, this guide equips you with the knowledge to leverage the full potential of your Linux experience.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Set Up a Home Logger with Grafana, Promtail, and Loki in Docker Compose</title>
      <link>https://www.sebastientaggart.com/writing/set-up-a-home-logger-with-grafana-promtail-and-loki-in-docker-compose/</link>
      <pubDate>Sun, 19 Dec 2021 07:26:46 -0500</pubDate>
      <guid>https://www.sebastientaggart.com/writing/set-up-a-home-logger-with-grafana-promtail-and-loki-in-docker-compose/</guid>
      <description>&lt;p&gt;We&amp;rsquo;re about to embark on an exciting journey into the realm of log aggregation using Grafana, Promtail, and Loki—all orchestrated through Docker Compose. This trio not only empowers you to take complete control over your logging but also extends a user-friendly graphical interface to explore your data with ease.&lt;/p&gt;
&lt;h2 id=&#34;prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;p&gt;Before we dive in, ensure that Docker and Docker Compose are installed on your home server. If you&amp;rsquo;re new to Docker, think of it as a toolkit that simplifies the process of developing, shipping, and running applications by leveraging containerization. For installation guidance, I recommend checking out the official Docker documentation.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>We&rsquo;re about to embark on an exciting journey into the realm of log aggregation using Grafana, Promtail, and Loki—all orchestrated through Docker Compose. This trio not only empowers you to take complete control over your logging but also extends a user-friendly graphical interface to explore your data with ease.</p>
<h2 id="prerequisites">Prerequisites</h2>
<p>Before we dive in, ensure that Docker and Docker Compose are installed on your home server. If you&rsquo;re new to Docker, think of it as a toolkit that simplifies the process of developing, shipping, and running applications by leveraging containerization. For installation guidance, I recommend checking out the official Docker documentation.</p>
<h2 id="setting-up-loki-and-promtail">Setting Up Loki and Promtail</h2>
<p>At the heart of our setup is Loki, a horizontally-scalable, highly-available log aggregation system inspired by Prometheus. Unlike traditional logging systems, Loki is designed for efficiency—it doesn’t index the content of logs but rather utilizes a set of labels for each log stream. This makes it both cost-effective and easy to operate.</p>
<p>Promtail acts as our log shipper, collecting log paths and metadata before pushing them to Loki. Let’s get started by crafting a <code>docker-compose.yml</code> file that will define our services:</p>
<pre tabindex="0"><code>version: &#34;3&#34;

services:
    loki:
        image: grafana/loki
        ports:
        - &#34;3100:3100&#34;
        command: -config.file=/etc/loki/local-config.yaml
        volume:
        - ./loki-local-config.yaml:/etc/loki/local-config.yaml
    promtail:
        image: grafana/promtail
        volumes:
        - ./promtail-config.yaml:/etc/promtail/config.yaml
        - /var/log:/var/log
        command: -config.file=/etc/promtail/config.yaml
</code></pre><h2 id="create-configuration-files">Create Configuration Files</h2>
<p>In the same directory as your <code>docker-compose.yml</code>, create two files: <code>loki-local-config.yaml</code> and <code>promtail-config.yaml</code>.</p>
<p>For <code>loki-local-config.yaml</code>, use the following configuration:</p>
<pre tabindex="0"><code>auth_enabled: false
server:
  http_listen_port: 3100
ingester:
  lifecycler:
    address: 127.0.0.1
    ring:
      kvstore:
        store: inmemory
      replication_factor: 1
      final_sleep: 0s
chunk_idle_period: 3m
max_chunk_age: 1h
chunk_target_size: 1048576
schema_config:
  configs:
  - from: 2020-10-24
    store: boltdb-shipper
    object_store: filesystem
    schema: v11
    index:
      prefix: index_
      period: 24h
</code></pre><p>And for <code>promtail-config.yaml</code>, input:</p>
<pre tabindex="0"><code>server:
  http_listen_port: 9080
  grpc_listen_port: 0
positions:
  filename: /tmp/positions.yaml
clients:
  - url: http://loki:3100/loki/api/v1/push
scrape_configs:
  - job_name: system
    static_configs:
      - targets:
          - localhost
        labels:
          job: varlogs
          __path__: /var/log/*log
</code></pre><h2 id="run-the-docker-compose">Run the Docker Compose</h2>
<p>With all the configuration files in place, it’s time to bring our setup to life. Navigate to the directory housing your <code>docker-compose.yml</code> file and execute the command:</p>
<pre tabindex="0"><code>docker-compose up
</code></pre><h2 id="setting-up-grafana">Setting Up Grafana</h2>
<p>Now we turn our attention to Grafana, the multi-platform visualization tool that transforms your data into stunning graphs, charts, and alerts.</p>
<p>Create a new Docker Compose file for Grafana with the following:</p>
<pre tabindex="0"><code>version: &#34;3&#34;
services:
    grafana:
        image: grafana/grafana
        ports:
        - 3000:3000
        volumes:
        - grafana_storage:/var/lib/grafana

volumes:
    grafana_storage:
</code></pre><p>Run this Docker Compose file just as you did for Loki and Promtail. Once it&rsquo;s up, navigate to Grafana by entering <code>http://localhost:3000</code> in your browser.</p>
<p>To integrate Grafana with Loki:</p>
<ol>
<li>Click on the gear icon in the side menu.</li>
<li>Select &ldquo;Data Sources.&rdquo;</li>
<li>Click on &ldquo;Add data source.&rdquo;</li>
<li>Choose &ldquo;Loki.&rdquo;</li>
<li>In the URL field, input: <code>http://localhost:3100</code>.</li>
</ol>
<p>Congratulations! If all has gone according to plan, you now have a fully functional logging solution right at your fingertips. Happy logging!</p>
]]></content:encoded>
    </item>
    <item>
      <title>Open Source Freedom: No Vendor Lock-In or Proprietary Systems</title>
      <link>https://www.sebastientaggart.com/writing/open-source-freedom-no-vendor-lock-in-or-proprietary-systems/</link>
      <pubDate>Tue, 13 Apr 2021 20:33:10 -0500</pubDate>
      <guid>https://www.sebastientaggart.com/writing/open-source-freedom-no-vendor-lock-in-or-proprietary-systems/</guid>
      <description>&lt;p&gt;Open source. You’ve likely encountered this term as you’ve navigated the software landscape. At its core, open source refers to a type of software license that grants users the ability to view, access, modify, and distribute source code. This stands in stark contrast to proprietary software, where the source code remains under lock and key, creating barriers to audit, modify, or learn from it.&lt;/p&gt;
&lt;p&gt;Why does this matter? Because the choice between open source and proprietary systems can fundamentally shape your organization’s agility and resilience.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Open source. You’ve likely encountered this term as you’ve navigated the software landscape. At its core, open source refers to a type of software license that grants users the ability to view, access, modify, and distribute source code. This stands in stark contrast to proprietary software, where the source code remains under lock and key, creating barriers to audit, modify, or learn from it.</p>
<p>Why does this matter? Because the choice between open source and proprietary systems can fundamentally shape your organization’s agility and resilience.</p>
<h2 id="the-perils-of-vendor-lock-in">The Perils of Vendor Lock-In</h2>
<p>Let’s unpack &ldquo;vendor lock-in.&rdquo; This refers to a scenario where customers find themselves trapped within a single vendor&rsquo;s ecosystem, making it arduous to transition to a competitor&rsquo;s offering. Proprietary software thrives on this model, crafting an environment where specific tools and services are exclusive to one provider.</p>
<p>At first glance, proprietary systems can be enticing, boasting a dazzling array of features and the allure of dedicated customer support. However, this initial appeal can quickly morph into dependency, limiting your organization’s flexibility and transparency. The costs associated with switching away from these tools can be staggering, often draining resources and stifling innovation.</p>
<p>Consider the many organizations that have found themselves ensnared by proprietary systems, rendered obsolete yet unable to migrate due to the complexity and financial burden involved. They become prisoners of their own technology.</p>
<h2 id="open-source-a-path-to-freedom">Open Source: A Path to Freedom</h2>
<p>Open source presents a liberating alternative. By opting for open source software, organizations can break free from the constraints of a single vendor. This freedom allows for customization and adaptability, empowering teams to tailor their technologies to meet evolving needs without the interference of profit-driven motives.</p>
<p>Take Linux, for instance. Choosing to build your system on this open-source operating system opens the door to a plethora of distributions and design choices. Should your current Linux variant cease to serve your needs, transitioning to a different one is seamless, thanks to the shared foundation of open standards.</p>
<h2 id="counting-the-clicks-simplifying-transitions">Counting the Clicks: Simplifying Transitions</h2>
<p>Now, let’s delve into the practical implications of such a switch. Open source solutions often streamline the migration process. With fewer applications to juggle, teams can focus on their core tasks rather than grappling with constant adjustments to new environments.</p>
<p>Moreover, the vibrant communities surrounding most open-source projects provide a wealth of resources—libraries, tutorials, troubleshooting techniques—all designed to ease the learning curve. This not only accelerates implementation but also reduces costs, allowing teams to hit the ground running.</p>
<h2 id="conclusion">Conclusion</h2>
<p>Opting for open source solutions empowers organizations to take charge of their technological destinies, unshackled from the whims of any single vendor. Avoiding vendor lock-in through open source isn’t merely a cost-saving measure; it’s a strategic investment in self-reliance, adaptability, and long-term success.</p>
<p>The ability to switch, transition, learn, innovate, and adapt are hallmarks of a resilient and forward-thinking organization. As we navigate an increasingly complex digital landscape, embracing open source might just be the most strategic decision you can make.</p>
]]></content:encoded>
    </item>
    <item>
      <title>How to Install Docker on Amazon Linux 2</title>
      <link>https://www.sebastientaggart.com/writing/installing-docker-on-amazon-linux2/</link>
      <pubDate>Thu, 30 Jan 2020 12:27:22 -0500</pubDate>
      <guid>https://www.sebastientaggart.com/writing/installing-docker-on-amazon-linux2/</guid>
      <description>&lt;p&gt;Installing Docker on Amazon Linux 2 is a straightforward process that opens up a world of possibilities for containerization. Let’s dive into the steps, ensuring you have a smooth experience from start to finish.&lt;/p&gt;
&lt;h3 id=&#34;step-1-update-your-system&#34;&gt;Step 1: Update Your System&lt;/h3&gt;
&lt;p&gt;First things first: you want to make sure your system is up to date. Run the following command to perform a quick update:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo yum update -y
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;step-2-install-docker&#34;&gt;Step 2: Install Docker&lt;/h3&gt;
&lt;p&gt;Once your system is prepped, installing Docker is as simple as executing:&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Installing Docker on Amazon Linux 2 is a straightforward process that opens up a world of possibilities for containerization. Let’s dive into the steps, ensuring you have a smooth experience from start to finish.</p>
<h3 id="step-1-update-your-system">Step 1: Update Your System</h3>
<p>First things first: you want to make sure your system is up to date. Run the following command to perform a quick update:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo yum update -y
</span></span></code></pre></div><h3 id="step-2-install-docker">Step 2: Install Docker</h3>
<p>Once your system is prepped, installing Docker is as simple as executing:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo yum install -y docker
</span></span></code></pre></div><h3 id="step-3-configure-user-permissions">Step 3: Configure User Permissions</h3>
<p>To streamline your workflow, it’s beneficial to add the <code>ec2-user</code> to the Docker group. This allows you to run Docker commands without needing to prefix them with <code>sudo</code>. Just remember: after making this change, log out and log back in for it to take effect.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo usermod -a -G docker ec2-user
</span></span></code></pre></div><h3 id="step-4-enable-and-start-docker-service">Step 4: Enable and Start Docker Service</h3>
<p>Now, let’s ensure that Docker starts automatically upon system boot and then initiate the service:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo systemctl <span class="nb">enable</span> docker
</span></span><span class="line"><span class="cl">sudo service docker start
</span></span></code></pre></div><h3 id="step-5-verify-your-installation">Step 5: Verify Your Installation</h3>
<p>To confirm that Docker is running as expected, you can check the version and list any running containers with the following commands:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">docker -v
</span></span><span class="line"><span class="cl">docker ps -a
</span></span></code></pre></div><p>You should see output similar to this:</p>
<pre tabindex="0"><code>[ec2-user@ip-172-27-0-223 ~]$ docker -v
Docker version 18.09.9-ce, build 039a7df
[ec2-user@ip-172-27-0-223 ~]$ docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
[ec2-user@ip-172-27-0-223 ~]$
</code></pre><h3 id="important-note">Important Note</h3>
<p>Keep in mind that Amazon Linux tends to ship with an older version of the Docker engine. At the time of this writing, the latest Docker version is <code>19.03</code>, while Amazon&rsquo;s package offers <code>18.09</code>. This disparity could affect certain features or compatibility, so always check the version you need for your projects.</p>
<h2 id="step-6-install-docker-compose">Step 6: Install Docker Compose</h2>
<p>If you&rsquo;re looking to manage multi-container Docker applications, Docker Compose is your friend. You can install it using the following command:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo curl -L <span class="s2">&#34;https://github.com/docker/compose/releases/download/1.25.3/docker-compose-</span><span class="k">$(</span>uname -s<span class="k">)</span><span class="s2">-</span><span class="k">$(</span>uname -m<span class="k">)</span><span class="s2">&#34;</span> -o /usr/local/bin/docker-compose <span class="o">&amp;&amp;</span> sudo chmod +x /usr/local/bin/docker-compose
</span></span></code></pre></div><h3 id="wrapping-up">Wrapping Up</h3>
<p>Congratulations! You now have Docker (and optionally Docker Compose) installed on your Amazon Linux 2 instance. This setup will empower you to build, ship, and run applications in containers, enhancing your workflows and development processes.</p>
<p>As you embark on this journey with Docker, remember: every container you create is a step towards a more efficient and modernized infrastructure. Happy containerizing!</p>
]]></content:encoded>
    </item>
  </channel>
</rss>
