<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Adminbook Exercise Answers on Markelov.Dev</title>
		<link>https://markelov.dev/adminbook/</link>
		<description>Recent content in Adminbook Exercise Answers on Markelov.Dev</description>
		<generator>Hugo</generator>
		<language>en-gb</language>
		
		
		
			<copyright>© 2007-2026 Andrey Markelov</copyright>
		
		
			<atom:link href="https://markelov.dev/adminbook/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Chapter 10: Networking Answers</title>
				<link>https://markelov.dev/adminbook/chapter_10/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://markelov.dev/adminbook/chapter_10/</guid>
				<description>&lt;header class=&#34;site-header&#34;&gt;&#xA;    &lt;p&gt;&lt;a href=&#34;https://markelov.dev/adminbook/&#34;&gt;&amp;larr; All chapters&lt;/a&gt; · &lt;a href=&#34;https://link.springer.com/book/9798868822254&#34;&gt;Book&lt;/a&gt; · &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook&#34;&gt;Repository&lt;/a&gt;&lt;/p&gt;&#xA;    &lt;h1&gt;Chapter 10: Networking Answers&lt;/h1&gt;&#xA;    &lt;p class=&#34;muted&#34;&gt;Red Hat RHCSA 10 Study Companion: Getting Ready for the EX200 Exam by Andrey Markelov (May 2026).&lt;/p&gt;&#xA;  &lt;/header&gt;&#xA;  &lt;h2&gt;Topics&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Network interface configuration&lt;/li&gt;&lt;li&gt;NetworkManager (nmcli)&lt;/li&gt;&lt;li&gt;Static and DHCP configurations&lt;/li&gt;&lt;li&gt;Hostname and DNS management&lt;/li&gt;&lt;li&gt;Firewall configuration (firewall-cmd)&lt;/li&gt;&lt;/ul&gt;&lt;nav class=&#34;toc&#34;&gt;&lt;h2&gt;Exercises&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&#34;#exercise_01-sh&#34;&gt;exercise_01.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_02-sh&#34;&gt;exercise_02.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_03-sh&#34;&gt;exercise_03.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_04-sh&#34;&gt;exercise_04.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_05-sh&#34;&gt;exercise_05.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_06-sh&#34;&gt;exercise_06.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_07-sh&#34;&gt;exercise_07.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_08-sh&#34;&gt;exercise_08.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_09-sh&#34;&gt;exercise_09.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_10-sh&#34;&gt;exercise_10.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_11-sh&#34;&gt;exercise_11.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_12-sh&#34;&gt;exercise_12.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_13-sh&#34;&gt;exercise_13.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_14-sh&#34;&gt;exercise_14.sh&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/nav&gt;&lt;hr&gt;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_01-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_01.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_10/exercise_01.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_10/exercise_01.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_01.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Exercise 1: Use the ip a command to list all network interfaces. &#xA;# Identify the IP address, netmask (in CIDR format), and MAC address for your primary Ethernet interface.&#xA;#&#xA;# Task: Display network interface information.&#xA;&#xA;ip addr show&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_02-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_02.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_10/exercise_02.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_10/exercise_02.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_02.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Exercise 2: Use the ip route show command to display the system&amp;#x27;s current routing table. &#xA;# Identify the default gateway and its associated metric.&#xA;#&#xA;# Task: Display routing table with gateway information.&#xA;&#xA;ip route show&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_03-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_03.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_10/exercise_03.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_10/exercise_03.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_03.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Exercise 3: Use nmcli con show to list all available NetworkManager connection profiles. &#xA;# Identify which connections are currently active and on which devices.&#xA;#&#xA;# Task: List all NetworkManager connections and their status.&#xA;&#xA;nmcli connection show&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_04-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_04.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_10/exercise_04.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_10/exercise_04.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_04.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Exercise 4: Use nmcli to display all properties for your primary active connection. &#xA;# Note the ipv4.method value.&#xA;#&#xA;# Task: Display detailed connection properties.&#xA;&#xA;# Get the active connection name&#xA;ACTIVE_CON=$(nmcli -t -f NAME,DEVICE connection show --active | head -n1 | cut -d: -f1)&#xA;&#xA;echo &amp;quot;Displaying properties for: $ACTIVE_CON&amp;quot;&#xA;echo &amp;quot;&amp;quot;&#xA;&#xA;nmcli con show &amp;quot;$ACTIVE_CON&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_05-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_05.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-unsafe&#34;&gt;safe: no&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: root&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_10/exercise_05.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_10/exercise_05.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_05.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: root&#xA;# @safe: no&#xA;set -euo pipefail&#xA;&#xA;# Exercise 5: Add a new, persistent NetworkManager connection named lab-dhcp &#xA;# for your second (likely disconnected) Ethernet interface. &#xA;# Ensure it is configured to get an IP address automatically via DHCP and to autoconnect.&#xA;#&#xA;# Task: Create a new DHCP-based network connection.&#xA;#&#xA;# Note: Replace &amp;#x27;enp8s0&amp;#x27; with your actual second network interface name.&#xA;&#xA;# You may need to identify your second interface first with: ip link show&#xA;&#xA;sudo nmcli con add con-name lab-dhcp type ethernet ifname enp8s0 \&#xA;  ipv4.method auto \&#xA;  connection.autoconnect yes&#xA;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;Connection &amp;#x27;lab-dhcp&amp;#x27; created.&amp;quot;&#xA;nmcli connection show&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_06-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_06.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-unsafe&#34;&gt;safe: no&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: root&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_10/exercise_06.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_10/exercise_06.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_06.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: root&#xA;# @safe: no&#xA;set -euo pipefail&#xA;&#xA;# Exercise 6: Create a new, persistent connection named static1 for your primary interface. &#xA;# Configure it with the following manual settings:&#xA;# IP Address: 192.168.122.55/24&#xA;# Gateway: 192.168.122.1&#xA;# DNS Server: 8.8.8.8&#xA;# Autoconnect: no&#xA;#&#xA;# Task: Create a static IP network configuration.&#xA;#&#xA;# Note: Replace &amp;#x27;enp1s0&amp;#x27; with your actual primary interface name.&#xA;&#xA;sudo nmcli con add con-name static1 type ethernet ifname enp1s0 \&#xA;  ipv4.method manual \&#xA;  ipv4.addresses 192.168.122.55/24 \&#xA;  ipv4.gateway 192.168.122.1 \&#xA;  ipv4.dns 8.8.8.8 \&#xA;  connection.autoconnect no&#xA;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;Connection &amp;#x27;static1&amp;#x27; created successfully.&amp;quot;&#xA;nmcli connection show&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_07-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_07.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-unsafe&#34;&gt;safe: no&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: root&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_10/exercise_07.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_10/exercise_07.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_07.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: root&#xA;# @safe: no&#xA;set -euo pipefail&#xA;&#xA;# Exercise 7: Bring the static1 connection up. &#xA;# Use ip a and ip route to verify that the static IP and new default gateway are active.&#xA;#&#xA;# Task: Activate a network connection and verify its status.&#xA;&#xA;sudo nmcli con up static1&#xA;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;=== IP Address Information ===&amp;quot;&#xA;ip a&#xA;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;=== Routing Table ===&amp;quot;&#xA;ip route&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_08-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_08.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-unsafe&#34;&gt;safe: no&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: root&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_10/exercise_08.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_10/exercise_08.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_08.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: root&#xA;# @safe: no&#xA;set -euo pipefail&#xA;&#xA;# Exercise 8: Add a second IP address, 10.10.10.55/24, to your active static1 connection. &#xA;# Do not remove the original 192.168.122.55/24 address. &#xA;# Verify with ip a that the interface now has both IP addresses.&#xA;#&#xA;# Task: Add a secondary IP address to an existing connection.&#xA;&#xA;sudo nmcli con mod static1 +ipv4.addresses 10.10.10.55/24&#xA;&#xA;sudo nmcli con up static1&#xA;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;Verifying both IP addresses:&amp;quot;&#xA;ip a show enp1s0&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_09-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_09.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-unsafe&#34;&gt;safe: no&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: root&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_10/exercise_09.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_10/exercise_09.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_09.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: root&#xA;# @safe: no&#xA;set -euo pipefail&#xA;&#xA;# Exercise 9: Change your system&amp;#x27;s persistent hostname to server15.test.local.&#xA;#&#xA;# Task: Set a new system hostname.&#xA;&#xA;sudo hostnamectl set-hostname server15.test.local&#xA;&#xA;echo &amp;quot;Hostname changed to server15.test.local&amp;quot;&#xA;echo &amp;quot;Please re-open your shell session to see the change.&amp;quot;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;Current hostname:&amp;quot;&#xA;hostnamectl&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_10-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_10.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-unsafe&#34;&gt;safe: no&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: root&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_10/exercise_10.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_10/exercise_10.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_10.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: root&#xA;# @safe: no&#xA;set -euo pipefail&#xA;&#xA;# Exercise 10: Edit the /etc/hosts file to add a new entry. &#xA;# The entry should map the IP address 192.168.122.55 to the hostnames web55.test.local and web55.&#xA;#&#xA;# Task: Add a hosts file entry.&#xA;&#xA;echo &amp;quot;192.168.122.55  web55.test.local web55&amp;quot; | sudo tee -a /etc/hosts&#xA;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;Entry added to /etc/hosts:&amp;quot;&#xA;grep &amp;quot;web55&amp;quot; /etc/hosts&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_11-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_11.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-unsafe&#34;&gt;safe: no&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: root&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_10/exercise_11.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_10/exercise_11.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_11.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: root&#xA;# @safe: no&#xA;set -euo pipefail&#xA;&#xA;# Exercise 11: Modify your active connection profile to use the static DNS servers 8.8.8.8 and 8.8.4.4&#xA;#&#xA;# Task: Configure custom DNS servers for a network connection.&#xA;&#xA;# Get the active connection name&#xA;ACTIVE_CON=$(nmcli -t -f NAME,DEVICE connection show --active | grep -v &amp;#x27;^lo:&amp;#x27; | head -n1 | cut -d: -f1)&#xA;&#xA;echo &amp;quot;Modifying connection: $ACTIVE_CON&amp;quot;&#xA;&#xA;sudo nmcli con mod &amp;quot;$ACTIVE_CON&amp;quot; ipv4.dns &amp;quot;8.8.8.8 8.8.4.4&amp;quot;&#xA;&#xA;sudo nmcli con up &amp;quot;$ACTIVE_CON&amp;quot;&#xA;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;DNS servers configured. Contents of /etc/resolv.conf:&amp;quot;&#xA;cat /etc/resolv.conf&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_12-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_12.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-unsafe&#34;&gt;safe: no&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: root&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_10/exercise_12.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_10/exercise_12.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_12.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: root&#xA;# @safe: no&#xA;set -euo pipefail&#xA;&#xA;# Exercise 12: Modify the same connection profile to set ipv4.ignore-auto-dns to yes. &#xA;# Reactivate the connection and then inspect the /etc/resolv.conf file &#xA;# to ensure only your manually set DNS servers are present.&#xA;#&#xA;# Task: Ignore DHCP-provided DNS servers and use only manually configured ones.&#xA;&#xA;# Get the active connection name&#xA;ACTIVE_CON=$(nmcli -t -f NAME,DEVICE connection show --active | grep -v &amp;#x27;^lo:&amp;#x27; | head -n1 | cut -d: -f1)&#xA;&#xA;echo &amp;quot;Modifying connection: $ACTIVE_CON&amp;quot;&#xA;&#xA;sudo nmcli con mod &amp;quot;$ACTIVE_CON&amp;quot; ipv4.ignore-auto-dns yes&#xA;&#xA;sudo nmcli con up &amp;quot;$ACTIVE_CON&amp;quot;&#xA;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;Auto-DNS ignored. Contents of /etc/resolv.conf:&amp;quot;&#xA;cat /etc/resolv.conf&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_13-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_13.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-unsafe&#34;&gt;safe: no&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: root&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_10/exercise_13.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_10/exercise_13.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_13.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: root&#xA;# @safe: no&#xA;set -euo pipefail&#xA;&#xA;# Exercise 13: Add the http service to the default zone&amp;#x27;s runtime configuration. &#xA;# Verify it is listed. Then, reload the firewall using firewall-cmd --reload &#xA;# and verify that the http service is now gone (because it was not permanent).&#xA;#&#xA;# Task: Demonstrate temporary vs permanent firewall rules.&#xA;&#xA;echo &amp;quot;Adding http service temporarily...&amp;quot;&#xA;sudo firewall-cmd --add-service=http&#xA;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;Current services (runtime):&amp;quot;&#xA;sudo firewall-cmd --list-services&#xA;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;Reloading firewall...&amp;quot;&#xA;sudo firewall-cmd --reload&#xA;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;Services after reload (http should be gone):&amp;quot;&#xA;sudo firewall-cmd --list-services&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_14-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_14.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-unsafe&#34;&gt;safe: no&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: root&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_10/exercise_14.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_10/exercise_14.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_14.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: root&#xA;# @safe: no&#xA;set -euo pipefail&#xA;&#xA;# Exercise 14: Permanently add TCP port 8080 to the public zone. &#xA;# Reload the firewall and verify that the port is now active in the runtime configuration.&#xA;#&#xA;# Task: Add a permanent firewall rule for a custom port.&#xA;&#xA;sudo firewall-cmd --zone=public --add-port=8080/tcp --permanent&#xA;&#xA;echo &amp;quot;Port 8080/tcp added permanently.&amp;quot;&#xA;echo &amp;quot;&amp;quot;&#xA;&#xA;echo &amp;quot;Reloading firewall...&amp;quot;&#xA;sudo firewall-cmd --reload&#xA;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;Open ports in public zone:&amp;quot;&#xA;sudo firewall-cmd --zone=public --list-ports&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;</description>
			</item>
			<item>
				<title>Chapter 11: SELinux Answers</title>
				<link>https://markelov.dev/adminbook/chapter_11/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://markelov.dev/adminbook/chapter_11/</guid>
				<description>&lt;header class=&#34;site-header&#34;&gt;&#xA;    &lt;p&gt;&lt;a href=&#34;https://markelov.dev/adminbook/&#34;&gt;&amp;larr; All chapters&lt;/a&gt; · &lt;a href=&#34;https://link.springer.com/book/9798868822254&#34;&gt;Book&lt;/a&gt; · &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook&#34;&gt;Repository&lt;/a&gt;&lt;/p&gt;&#xA;    &lt;h1&gt;Chapter 11: SELinux Answers&lt;/h1&gt;&#xA;    &lt;p class=&#34;muted&#34;&gt;Red Hat RHCSA 10 Study Companion: Getting Ready for the EX200 Exam by Andrey Markelov (May 2026).&lt;/p&gt;&#xA;  &lt;/header&gt;&#xA;  &lt;h2&gt;Topics&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;SELinux contexts&lt;/li&gt;&lt;li&gt;File and port labeling&lt;/li&gt;&lt;li&gt;SELinux booleans&lt;/li&gt;&lt;/ul&gt;&lt;nav class=&#34;toc&#34;&gt;&lt;h2&gt;Exercises&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&#34;#exercise_01-sh&#34;&gt;exercise_01.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_02-sh&#34;&gt;exercise_02.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_03-sh&#34;&gt;exercise_03.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_04-sh&#34;&gt;exercise_04.sh&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/nav&gt;&lt;hr&gt;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_01-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_01.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_11/exercise_01.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_11/exercise_01.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_01.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Exercise 1: Write the two commands necessary to check the SELinux context (label) &#xA;# for both the running sshd process and the /etc/ssh/sshd_config file.&#xA;#&#xA;# Task: Display SELinux contexts for process and file.&#xA;&#xA;echo &amp;quot;=== SELinux context for sshd process ===&amp;quot;&#xA;ps -eZ | grep sshd&#xA;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;=== SELinux context for /etc/ssh/sshd_config ===&amp;quot;&#xA;ls -Z /etc/ssh/sshd_config&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_02-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_02.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-unsafe&#34;&gt;safe: no&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: root&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_11/exercise_02.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_11/exercise_02.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_02.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: root&#xA;# @safe: no&#xA;set -euo pipefail&#xA;&#xA;# Exercise 2: You have created a new directory, /srv/www/, which needs to be served by Apache. &#xA;# Write the two commands required to permanently set the context for this directory &#xA;# and all its contents to httpd_sys_content_t.&#xA;#&#xA;# Task: Set SELinux context for Apache web content directory.&#xA;&#xA;# Add the context rule permanently&#xA;sudo semanage fcontext -a -t httpd_sys_content_t &amp;quot;/srv/www(/.*)?&amp;quot;&#xA;&#xA;# Apply the context to the directory&#xA;sudo restorecon -Rv /srv/www&#xA;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;SELinux context has been set for /srv/www&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_03-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_03.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-unsafe&#34;&gt;safe: no&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: root&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_11/exercise_03.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_11/exercise_03.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_03.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: root&#xA;# @safe: no&#xA;set -euo pipefail&#xA;&#xA;# Exercise 3: The company wants to run a secondary HTTP server on port 8988. &#xA;# Write the command to permanently label TCP port 8988 as a valid http_port_t port.&#xA;#&#xA;# Task: Add a custom port to SELinux http_port_t type.&#xA;&#xA;sudo semanage port -a -t http_port_t -p tcp 8988&#xA;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;Port 8988 has been added to http_port_t&amp;quot;&#xA;echo &amp;quot;&amp;quot;&#xA;&#xA;sudo semanage port -l | grep http_port_t&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_04-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_04.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-unsafe&#34;&gt;safe: no&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: root&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_11/exercise_04.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_11/exercise_04.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_04.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: root&#xA;# @safe: no&#xA;set -euo pipefail&#xA;&#xA;# Exercise 4: Find and enable the SELinux boolean permanently that allows the Apache web server to use NFS.&#xA;#&#xA;# Task: Enable SELinux boolean for Apache NFS access.&#xA;&#xA;echo &amp;quot;Searching for NFS-related Apache booleans...&amp;quot;&#xA;sudo semanage boolean -l | grep nfs | grep http&#xA;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;Enabling httpd_use_nfs boolean permanently...&amp;quot;&#xA;sudo setsebool -P httpd_use_nfs on&#xA;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;Boolean has been enabled.&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;</description>
			</item>
			<item>
				<title>Chapter 2: Documentation and Basic Commands Answers</title>
				<link>https://markelov.dev/adminbook/chapter_2/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://markelov.dev/adminbook/chapter_2/</guid>
				<description>&lt;header class=&#34;site-header&#34;&gt;&#xA;    &lt;p&gt;&lt;a href=&#34;https://markelov.dev/adminbook/&#34;&gt;&amp;larr; All chapters&lt;/a&gt; · &lt;a href=&#34;https://link.springer.com/book/9798868822254&#34;&gt;Book&lt;/a&gt; · &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook&#34;&gt;Repository&lt;/a&gt;&lt;/p&gt;&#xA;    &lt;h1&gt;Chapter 2: Documentation and Basic Commands Answers&lt;/h1&gt;&#xA;    &lt;p class=&#34;muted&#34;&gt;Red Hat RHCSA 10 Study Companion: Getting Ready for the EX200 Exam by Andrey Markelov (May 2026).&lt;/p&gt;&#xA;  &lt;/header&gt;&#xA;  &lt;h2&gt;Topics&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Man pages, info pages&lt;/li&gt;&lt;li&gt;Bash aliases&lt;/li&gt;&lt;li&gt;Find command and pipes&lt;/li&gt;&lt;li&gt;Vim tutorial&lt;/li&gt;&lt;/ul&gt;&lt;nav class=&#34;toc&#34;&gt;&lt;h2&gt;Exercises&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&#34;#exercise_01-sh&#34;&gt;exercise_01.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_02-sh&#34;&gt;exercise_02.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_03-sh&#34;&gt;exercise_03.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_04-sh&#34;&gt;exercise_04.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_05-sh&#34;&gt;exercise_05.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_extra_01-sh&#34;&gt;exercise_extra_01.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_extra_02-sh&#34;&gt;exercise_extra_02.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_extra_03-sh&#34;&gt;exercise_extra_03.sh&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/nav&gt;&lt;hr&gt;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_01-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_01.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_2/exercise_01.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_2/exercise_01.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_01.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Exercise 1: Check the man page for the file passwd to find the name of the fifth field and why it has this name.&#xA;#&#xA;# Task: Use the man command to view the passwd file format documentation&#xA;# and identify what the fifth field represents.&#xA;&#xA;man 5 passwd&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_02-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_02.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_2/exercise_02.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_2/exercise_02.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_02.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Exercise 2: Call info info and read tutorial. If missed install info package.&#xA;#&#xA;# Task: Open the info documentation system&amp;#x27;s tutorial to learn how to use info pages.&#xA;&#xA;info info&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_03-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_03.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_2/exercise_03.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_2/exercise_03.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_03.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Exercise 3: Find in the bash manual page description of aliases and create an alias lls for ls -lah&#xA;#&#xA;# Task: Search the bash man page for ALIASES section and create a persistent alias&#xA;# for the &amp;#x27;ls -lah&amp;#x27; command named &amp;#x27;lls&amp;#x27;.&#xA;&#xA;# First, view the bash manual for aliases&#xA;# man bash&#xA;# Type /ALIASES and press Enter to search&#xA;&#xA;# Create the alias in .bashrc&#xA;echo &amp;quot;alias lls=&amp;#x27;ls -lah&amp;#x27;&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&#xA;&#xA;# Apply the changes to the current session&#xA;source ~/.bashrc&#xA;&#xA;echo &amp;quot;Alias &amp;#x27;lls&amp;#x27; has been created for &amp;#x27;ls -lah&amp;#x27;&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_04-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_04.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_2/exercise_04.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_2/exercise_04.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_04.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Exercise 4: By using a pipe and a find tool, make a command that will display the number &#xA;# of files in the /etc directory containing &amp;quot;an&amp;quot; in the name.&#xA;#&#xA;# Task: Use find to search for files with &amp;quot;an&amp;quot; in their names in /etc directory,&#xA;# and count them using wc.&#xA;&#xA;find /etc -type f -name &amp;quot;*an*&amp;quot; 2&amp;gt;/dev/null | wc -l&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_05-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_05.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_2/exercise_05.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_2/exercise_05.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_05.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Exercise 5: Run the command vimtutor and follow the exercises (it will take about 20 minutes).&#xA;#&#xA;# Task: Launch the interactive Vim tutorial to learn basic Vim text editor commands.&#xA;&#xA;vimtutor&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_extra_01-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_extra_01.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_2/exercise_extra_01.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_2/exercise_extra_01.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_extra_01.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Extra Exercise 1: Use the find command to locate all files in /var/log that were &#xA;# modified in the last 24 hours. Sort the results by modification time (newest first).&#xA;#&#xA;# Task: Find recently modified log files using find with -mtime.&#xA;&#xA;echo &amp;quot;Files in /var/log modified in the last 24 hours (newest first):&amp;quot;&#xA;echo &amp;quot;&amp;quot;&#xA;find /var/log -type f -mtime -1 2&amp;gt;/dev/null | xargs ls -lt 2&amp;gt;/dev/null | head -20&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_extra_02-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_extra_02.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_2/exercise_extra_02.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_2/exercise_extra_02.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_extra_02.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Extra Exercise 2: Create a command pipeline that reads /etc/passwd, extracts &#xA;# all unique shells (field 7), sorts them, and displays how many users use each shell.&#xA;#&#xA;# Task: Use cut, sort, uniq in a pipeline to analyze shell usage.&#xA;&#xA;echo &amp;quot;Shell usage statistics from /etc/passwd:&amp;quot;&#xA;echo &amp;quot;&amp;quot;&#xA;cut -d: -f7 /etc/passwd | sort | uniq -c | sort -rn&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_extra_03-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_extra_03.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_2/exercise_extra_03.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_2/exercise_extra_03.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_extra_03.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Extra Exercise 3: Use the head and tail commands together to extract lines 10-20&#xA;# from /etc/passwd. Then use sed to achieve the same result.&#xA;#&#xA;# Task: Extract a range of lines from a file using different methods.&#xA;&#xA;echo &amp;quot;=== Using head and tail ===&amp;quot;&#xA;head -20 /etc/passwd | tail -11&#xA;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;=== Using sed ===&amp;quot;&#xA;sed -n &amp;#x27;10,20p&amp;#x27; /etc/passwd&#xA;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;=== Using awk ===&amp;quot;&#xA;awk &amp;#x27;NR&amp;gt;=10 &amp;amp;&amp;amp; NR&amp;lt;=20&amp;#x27; /etc/passwd&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;</description>
			</item>
			<item>
				<title>Chapter 3: Bash Scripting Answers</title>
				<link>https://markelov.dev/adminbook/chapter_3/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://markelov.dev/adminbook/chapter_3/</guid>
				<description>&lt;header class=&#34;site-header&#34;&gt;&#xA;    &lt;p&gt;&lt;a href=&#34;https://markelov.dev/adminbook/&#34;&gt;&amp;larr; All chapters&lt;/a&gt; · &lt;a href=&#34;https://link.springer.com/book/9798868822254&#34;&gt;Book&lt;/a&gt; · &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook&#34;&gt;Repository&lt;/a&gt;&lt;/p&gt;&#xA;    &lt;h1&gt;Chapter 3: Bash Scripting Answers&lt;/h1&gt;&#xA;    &lt;p class=&#34;muted&#34;&gt;Red Hat RHCSA 10 Study Companion: Getting Ready for the EX200 Exam by Andrey Markelov (May 2026).&lt;/p&gt;&#xA;  &lt;/header&gt;&#xA;  &lt;h2&gt;Topics&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Argument processing&lt;/li&gt;&lt;li&gt;File and directory operations&lt;/li&gt;&lt;li&gt;Conditional statements and loops&lt;/li&gt;&lt;li&gt;Test operators&lt;/li&gt;&lt;/ul&gt;&lt;nav class=&#34;toc&#34;&gt;&lt;h2&gt;Exercises&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&#34;#exercise_01-sh&#34;&gt;exercise_01.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_02-sh&#34;&gt;exercise_02.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_03-sh&#34;&gt;exercise_03.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_04-sh&#34;&gt;exercise_04.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_05-sh&#34;&gt;exercise_05.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_extra_01-sh&#34;&gt;exercise_extra_01.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_extra_02-sh&#34;&gt;exercise_extra_02.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_extra_03-sh&#34;&gt;exercise_extra_03.sh&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/nav&gt;&lt;hr&gt;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_01-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_01.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_3/exercise_01.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_3/exercise_01.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_01.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Exercise 1: Create a script that takes two numbers as command-line arguments and prints their sum.&#xA;#&#xA;# Task: Accept two numeric arguments, validate them, and calculate their sum.&#xA;&#xA;if [ $# -ne 2 ]; then&#xA;    echo &amp;quot;Error: Two numbers required&amp;quot;&#xA;    echo &amp;quot;Usage: $0 number1 number2&amp;quot;&#xA;    exit 1&#xA;fi&#xA;&#xA;if ! [[ &amp;quot;$1&amp;quot; =~ ^-?[0-9]+$ ]] || ! [[ &amp;quot;$2&amp;quot; =~ ^-?[0-9]+$ ]]; then&#xA;    echo &amp;quot;Error: Both arguments must be numbers&amp;quot;&#xA;    exit 1&#xA;fi&#xA;&#xA;sum=$(( $1 + $2 ))&#xA;echo &amp;quot;Sum of $1 and $2 is: $sum&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_02-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_02.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_3/exercise_02.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_3/exercise_02.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_02.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Exercise 2: Write a script that checks if a file provided as a command-line argument exists.&#xA;#&#xA;# Task: Accept a filename as an argument and check if it exists as a regular file,&#xA;# directory, or doesn&amp;#x27;t exist at all.&#xA;&#xA;if [ $# -eq 0 ]; then&#xA;    echo &amp;quot;Error: No filename provided&amp;quot;&#xA;    echo &amp;quot;Usage: $0 filename&amp;quot;&#xA;    exit 1&#xA;fi&#xA;&#xA;filename=&amp;quot;$1&amp;quot;&#xA;&#xA;if [ -f &amp;quot;$filename&amp;quot; ]; then&#xA;    echo &amp;quot;File &amp;#x27;$filename&amp;#x27; exists&amp;quot;&#xA;    ls -lh &amp;quot;$filename&amp;quot;&#xA;    exit 0&#xA;elif [ -d &amp;quot;$filename&amp;quot; ]; then&#xA;    echo &amp;quot;&amp;#x27;$filename&amp;#x27; is a directory, not a regular file&amp;quot;&#xA;    exit 2&#xA;else&#xA;    echo &amp;quot;File &amp;#x27;$filename&amp;#x27; does not exist&amp;quot;&#xA;    exit 1&#xA;fi&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_03-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_03.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_3/exercise_03.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_3/exercise_03.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_03.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Exercise 3: Create a script that creates a directory if it doesn&amp;#x27;t already exist.&#xA;#&#xA;# Task: Accept a directory name as an argument and create it if it doesn&amp;#x27;t exist.&#xA;# Handle cases where a file with the same name exists.&#xA;&#xA;if [ $# -eq 0 ]; then&#xA;    echo &amp;quot;Error: No directory name provided&amp;quot;&#xA;    echo &amp;quot;Usage: $0 directory_name&amp;quot;&#xA;    exit 1&#xA;fi&#xA;&#xA;dirname=&amp;quot;$1&amp;quot;&#xA;&#xA;if [ -d &amp;quot;$dirname&amp;quot; ]; then&#xA;    echo &amp;quot;Directory &amp;#x27;$dirname&amp;#x27; already exists&amp;quot;&#xA;    ls -ld &amp;quot;$dirname&amp;quot;&#xA;    exit 0&#xA;fi&#xA;&#xA;if [ -e &amp;quot;$dirname&amp;quot; ]; then&#xA;    echo &amp;quot;Error: &amp;#x27;$dirname&amp;#x27; exists but is not a directory&amp;quot;&#xA;    exit 1&#xA;fi&#xA;&#xA;if mkdir -p &amp;quot;$dirname&amp;quot;; then&#xA;    echo &amp;quot;Directory &amp;#x27;$dirname&amp;#x27; created successfully&amp;quot;&#xA;    ls -ld &amp;quot;$dirname&amp;quot;&#xA;    exit 0&#xA;else&#xA;    echo &amp;quot;Failed to create directory &amp;#x27;$dirname&amp;#x27;&amp;quot;&#xA;    exit 1&#xA;fi&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_04-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_04.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_3/exercise_04.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_3/exercise_04.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_04.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Exercise 4: Create a script that performs a numeric countdown from a given starting number to 1.&#xA;# If no argument is provided or the argument is not a positive integer, print an error message and exit.&#xA;#&#xA;# Task: Count down from a specified positive integer to 1, with input validation.&#xA;&#xA;if [ $# -eq 0 ]; then&#xA;    echo &amp;quot;Error: No starting number provided&amp;quot;&#xA;    echo &amp;quot;Usage: $0 positive_integer&amp;quot;&#xA;    exit 1&#xA;fi&#xA;&#xA;start=&amp;quot;$1&amp;quot;&#xA;&#xA;if ! [[ &amp;quot;$start&amp;quot; =~ ^[0-9]+$ ]]; then&#xA;    echo &amp;quot;Error: &amp;#x27;$start&amp;#x27; is not a valid positive integer&amp;quot;&#xA;    exit 1&#xA;fi&#xA;&#xA;if [ &amp;quot;$start&amp;quot; -le 0 ]; then&#xA;    echo &amp;quot;Error: Number must be greater than 0&amp;quot;&#xA;    exit 1&#xA;fi&#xA;&#xA;echo &amp;quot;Starting countdown from $start...&amp;quot;&#xA;for ((i=start; i&amp;gt;=1; i--)); do&#xA;    echo &amp;quot;$i&amp;quot;&#xA;done&#xA;&#xA;echo &amp;quot;Countdown complete!&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_05-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_05.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_3/exercise_05.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_3/exercise_05.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_05.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Exercise 5: Write a script that lists all executable regular files in the current directory.&#xA;#&#xA;# Task: Find all files in the current directory that are both regular files and executable,&#xA;# then display them with file details.&#xA;&#xA;echo &amp;quot;Executable files in current directory:&amp;quot;&#xA;&#xA;count=0&#xA;&#xA;for file in *; do&#xA;    if [ -f &amp;quot;$file&amp;quot; ] &amp;amp;&amp;amp; [ -x &amp;quot;$file&amp;quot; ]; then&#xA;        ls -lh &amp;quot;$file&amp;quot;&#xA;        ((count++))&#xA;    fi&#xA;done&#xA;&#xA;echo &amp;quot;Total executable files found: $count&amp;quot;&#xA;&#xA;if [ $count -eq 0 ]; then&#xA;    echo &amp;quot;No executable files found&amp;quot;&#xA;    exit 1&#xA;else&#xA;    exit 0&#xA;fi&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_extra_01-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_extra_01.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_3/exercise_extra_01.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_3/exercise_extra_01.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_extra_01.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Extra Exercise 1: Write a script that takes a filename as an argument&#xA;# and displays the number of lines, words, and characters in the file.&#xA;# If no argument is provided, print a usage message.&#xA;&#xA;if [ $# -eq 0 ]; then&#xA;    echo &amp;quot;Usage: $0 &amp;lt;filename&amp;gt;&amp;quot;&#xA;    exit 1&#xA;fi&#xA;&#xA;FILE=&amp;quot;$1&amp;quot;&#xA;&#xA;if [ ! -f &amp;quot;$FILE&amp;quot; ]; then&#xA;    echo &amp;quot;Error: File &amp;#x27;$FILE&amp;#x27; does not exist or is not a regular file.&amp;quot;&#xA;    exit 1&#xA;fi&#xA;&#xA;LINES=$(wc -l &amp;lt; &amp;quot;$FILE&amp;quot;)&#xA;WORDS=$(wc -w &amp;lt; &amp;quot;$FILE&amp;quot;)&#xA;CHARS=$(wc -c &amp;lt; &amp;quot;$FILE&amp;quot;)&#xA;&#xA;echo &amp;quot;File: $FILE&amp;quot;&#xA;echo &amp;quot;Lines: $LINES&amp;quot;&#xA;echo &amp;quot;Words: $WORDS&amp;quot;&#xA;echo &amp;quot;Characters: $CHARS&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_extra_02-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_extra_02.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_3/exercise_extra_02.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_3/exercise_extra_02.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_extra_02.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Extra Exercise 2: Write a script that generates a simple multiplication table&#xA;# for a number provided as an argument. Display the table from 1 to 10.&#xA;# Use a for loop with the seq command.&#xA;&#xA;if [ $# -eq 0 ]; then&#xA;    echo &amp;quot;Usage: $0 &amp;lt;number&amp;gt;&amp;quot;&#xA;    exit 1&#xA;fi&#xA;&#xA;NUM=&amp;quot;$1&amp;quot;&#xA;&#xA;# Validate that the argument is a number&#xA;if ! [[ &amp;quot;$NUM&amp;quot; =~ ^-?[0-9]+$ ]]; then&#xA;    echo &amp;quot;Error: &amp;#x27;$NUM&amp;#x27; is not a valid integer.&amp;quot;&#xA;    exit 1&#xA;fi&#xA;&#xA;echo &amp;quot;Multiplication table for $NUM:&amp;quot;&#xA;echo &amp;quot;==============================&amp;quot;&#xA;&#xA;for i in $(seq 1 10); do&#xA;    RESULT=$((NUM * i))&#xA;    printf &amp;quot;%d x %2d = %d\n&amp;quot; &amp;quot;$NUM&amp;quot; &amp;quot;$i&amp;quot; &amp;quot;$RESULT&amp;quot;&#xA;done&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_extra_03-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_extra_03.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_3/exercise_extra_03.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_3/exercise_extra_03.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_extra_03.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Extra Exercise 3: Write a script that monitors a given log file and&#xA;# counts the number of ERROR, WARNING, and INFO lines.&#xA;# Accept the log file path as an argument. Use grep -c for counting.&#xA;&#xA;if [ $# -eq 0 ]; then&#xA;    echo &amp;quot;Usage: $0 &amp;lt;logfile&amp;gt;&amp;quot;&#xA;    exit 1&#xA;fi&#xA;&#xA;LOGFILE=&amp;quot;$1&amp;quot;&#xA;&#xA;if [ ! -f &amp;quot;$LOGFILE&amp;quot; ]; then&#xA;    echo &amp;quot;Error: File &amp;#x27;$LOGFILE&amp;#x27; does not exist.&amp;quot;&#xA;    exit 1&#xA;fi&#xA;&#xA;ERRORS=$(grep -ci &amp;quot;error&amp;quot; &amp;quot;$LOGFILE&amp;quot;)&#xA;WARNINGS=$(grep -ci &amp;quot;warning&amp;quot; &amp;quot;$LOGFILE&amp;quot;)&#xA;INFOS=$(grep -ci &amp;quot;info&amp;quot; &amp;quot;$LOGFILE&amp;quot;)&#xA;TOTAL=$(wc -l &amp;lt; &amp;quot;$LOGFILE&amp;quot;)&#xA;&#xA;echo &amp;quot;Log file analysis: $LOGFILE&amp;quot;&#xA;echo &amp;quot;==============================&amp;quot;&#xA;echo &amp;quot;Total lines:  $TOTAL&amp;quot;&#xA;echo &amp;quot;ERROR lines:  $ERRORS&amp;quot;&#xA;echo &amp;quot;WARNING lines: $WARNINGS&amp;quot;&#xA;echo &amp;quot;INFO lines:   $INFOS&amp;quot;&#xA;&#xA;if [ &amp;quot;$ERRORS&amp;quot; -gt 0 ]; then&#xA;    echo &amp;quot;&amp;quot;&#xA;    echo &amp;quot;Last 5 ERROR lines:&amp;quot;&#xA;    grep -i &amp;quot;error&amp;quot; &amp;quot;$LOGFILE&amp;quot; | tail -5&#xA;fi&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;</description>
			</item>
			<item>
				<title>Chapter 4: User and Group Management Answers</title>
				<link>https://markelov.dev/adminbook/chapter_4/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://markelov.dev/adminbook/chapter_4/</guid>
				<description>&lt;header class=&#34;site-header&#34;&gt;&#xA;    &lt;p&gt;&lt;a href=&#34;https://markelov.dev/adminbook/&#34;&gt;&amp;larr; All chapters&lt;/a&gt; · &lt;a href=&#34;https://link.springer.com/book/9798868822254&#34;&gt;Book&lt;/a&gt; · &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook&#34;&gt;Repository&lt;/a&gt;&lt;/p&gt;&#xA;    &lt;h1&gt;Chapter 4: User and Group Management Answers&lt;/h1&gt;&#xA;    &lt;p class=&#34;muted&#34;&gt;Red Hat RHCSA 10 Study Companion: Getting Ready for the EX200 Exam by Andrey Markelov (May 2026).&lt;/p&gt;&#xA;  &lt;/header&gt;&#xA;  &lt;h2&gt;Topics&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Creating users and groups&lt;/li&gt;&lt;li&gt;User modification and deletion&lt;/li&gt;&lt;li&gt;Password aging policies&lt;/li&gt;&lt;li&gt;Sudo configuration&lt;/li&gt;&lt;/ul&gt;&lt;nav class=&#34;toc&#34;&gt;&lt;h2&gt;Exercises&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&#34;#exercise_01-sh&#34;&gt;exercise_01.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_02-sh&#34;&gt;exercise_02.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_03-sh&#34;&gt;exercise_03.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_04-sh&#34;&gt;exercise_04.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_05-sh&#34;&gt;exercise_05.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_06-sh&#34;&gt;exercise_06.sh&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/nav&gt;&lt;hr&gt;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_01-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_01.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-unsafe&#34;&gt;safe: no&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: root&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_4/exercise_01.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_4/exercise_01.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_01.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: root&#xA;# @safe: no&#xA;set -euo pipefail&#xA;&#xA;# Exercise 1: Create a new devusers group. Create new users named devuser1, devuser2, and devuser3,&#xA;# and add them to the devusers group. Add devuser1 to the wheel group.&#xA;#&#xA;# Task: Set up a new group and three users with proper group memberships.&#xA;&#xA;sudo groupadd devusers&#xA;sudo useradd -G devusers devuser1&#xA;sudo useradd -G devusers devuser2&#xA;sudo useradd -G devusers devuser3&#xA;sudo usermod -aG wheel devuser1&#xA;&#xA;# Set passwords for the users&#xA;echo &amp;quot;Password for user devuser1&amp;quot;&#xA;sudo passwd devuser1&#xA;echo &amp;quot;Password for user devuser2&amp;quot;&#xA;sudo passwd devuser2&#xA;echo &amp;quot;Password for user devuser3&amp;quot;&#xA;sudo passwd devuser3&#xA;&#xA;# Verify user configurations&#xA;id devuser1&#xA;id devuser2&#xA;id devuser3&#xA;&#xA;# Verify group memberships&#xA;getent group wheel&#xA;getent group devusers&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_02-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_02.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-unsafe&#34;&gt;safe: no&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: root&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_4/exercise_02.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_4/exercise_02.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_02.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: root&#xA;# @safe: no&#xA;set -euo pipefail&#xA;&#xA;# Exercise 2: Modify the devuser3 account. Change the comment field to &amp;quot;Senior Developer - devuser3&amp;quot;,&#xA;# add him to an existing secondary group named sshd, and change their default shell to /usr/sbin/nologin.&#xA;# Ensure that existing secondary groups are preserved.&#xA;#&#xA;# Task: Modify user attributes including comment, shell, and group membership.&#xA;&#xA;sudo usermod -c &amp;quot;Senior Developer - devuser3&amp;quot; -aG sshd -s /usr/sbin/nologin devuser3&#xA;&#xA;# Verify the changes&#xA;getent passwd devuser3&#xA;id devuser3&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_03-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_03.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-unsafe&#34;&gt;safe: no&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: root&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_4/exercise_03.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_4/exercise_03.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_03.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: root&#xA;# @safe: no&#xA;set -euo pipefail&#xA;&#xA;# Exercise 3: Lock the devuser2 account. Verify the change by checking entry in /etc/shadow.&#xA;#&#xA;# Task: Lock a user account and verify the lock status in the shadow file.&#xA;&#xA;sudo usermod -L devuser2&#xA;&#xA;# Verify the lock (should see &amp;#x27;!&amp;#x27; before the password hash)&#xA;sudo grep devuser2 /etc/shadow&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_04-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_04.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-unsafe&#34;&gt;safe: no&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: root&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_4/exercise_04.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_4/exercise_04.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_04.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: root&#xA;# @safe: no&#xA;set -euo pipefail&#xA;&#xA;# Exercise 4: Delete the devuser2 account, ensuring the home directory is also deleted.&#xA;# Verify that the entry is no longer in /etc/passwd.&#xA;#&#xA;# Task: Remove a user account completely including their home directory.&#xA;&#xA;sudo userdel -r devuser2&#xA;&#xA;# Verify deletion&#xA;sudo grep devuser2 /etc/shadow&#xA;sudo ls /home&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_05-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_05.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-unsafe&#34;&gt;safe: no&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: root&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_4/exercise_05.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_4/exercise_05.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_05.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: root&#xA;# @safe: no&#xA;set -euo pipefail&#xA;&#xA;# Exercise 5: For devuser1, set the minimum number of days between password changes to 8 and &#xA;# the maximum number of days to 40. Set the warning period before devuser1&amp;#x27;s password expires &#xA;# to 14 days. Force devuser1 to change their password on the next login. &#xA;# Set the devuser1&amp;#x27;s account to expire on December 30, 2028.&#xA;#&#xA;# Task: Configure password aging and account expiration settings for a user.&#xA;&#xA;sudo chage -m 8 -M 40 -W 14 -d 0 -E 2028-12-31 devuser1&#xA;&#xA;# Verify the settings&#xA;sudo chage -l devuser1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_06-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_06.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-unsafe&#34;&gt;safe: no&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: root&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_4/exercise_06.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_4/exercise_06.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_06.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: root&#xA;# @safe: no&#xA;set -euo pipefail&#xA;&#xA;# Exercise 6: Create a new file /etc/sudoers.d/devs using visudo with option -f. &#xA;# In this new file, add a rule that allows the user devuser2 to run all commands as root &#xA;# without needing a password. Add a rule that allows the group devusers to run all commands &#xA;# defined by alias SERVICES from /etc/sudoers as root that require a password. &#xA;# Make sure SERVICES is uncommented in /etc/sudoers.&#xA;# Will devuser2 be required to use a password for /usr/bin/systemctl start?&#xA;#&#xA;# Task: Configure sudo rules for users and groups with specific permissions.&#xA;&#xA;# Create the sudoers file using visudo&#xA;sudo visudo -f /etc/sudoers.d/devs&#xA;&#xA;# Add these lines to the file:&#xA;# devuser2 ALL=(ALL) NOPASSWD: ALL&#xA;# %devusers ALL=(ALL) SERVICES&#xA;&#xA;# Answer: No, devuser2 will not be required to use a password for /usr/bin/systemctl start&#xA;# because devuser2 has NOPASSWD for ALL commands.&#xA;&#xA;echo &amp;quot;After running this script, edit /etc/sudoers.d/devs with:&amp;quot;&#xA;echo &amp;quot;devuser2 ALL=(ALL) NOPASSWD: ALL&amp;quot;&#xA;echo &amp;quot;%devusers ALL=(ALL) SERVICES&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;</description>
			</item>
			<item>
				<title>Chapter 5: Disk Management and LVM Answers</title>
				<link>https://markelov.dev/adminbook/chapter_5/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://markelov.dev/adminbook/chapter_5/</guid>
				<description>&lt;header class=&#34;site-header&#34;&gt;&#xA;    &lt;p&gt;&lt;a href=&#34;https://markelov.dev/adminbook/&#34;&gt;&amp;larr; All chapters&lt;/a&gt; · &lt;a href=&#34;https://link.springer.com/book/9798868822254&#34;&gt;Book&lt;/a&gt; · &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook&#34;&gt;Repository&lt;/a&gt;&lt;/p&gt;&#xA;    &lt;h1&gt;Chapter 5: Disk Management and LVM Answers&lt;/h1&gt;&#xA;    &lt;p class=&#34;muted&#34;&gt;Red Hat RHCSA 10 Study Companion: Getting Ready for the EX200 Exam by Andrey Markelov (May 2026).&lt;/p&gt;&#xA;  &lt;/header&gt;&#xA;  &lt;h2&gt;Topics&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Disk partitioning (fdisk)&lt;/li&gt;&lt;li&gt;Physical volumes and volume groups&lt;/li&gt;&lt;li&gt;Logical volumes&lt;/li&gt;&lt;li&gt;LVM cleanup&lt;/li&gt;&lt;/ul&gt;&lt;nav class=&#34;toc&#34;&gt;&lt;h2&gt;Exercises&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&#34;#exercise_01-sh&#34;&gt;exercise_01.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_02-sh&#34;&gt;exercise_02.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_03-sh&#34;&gt;exercise_03.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_04-sh&#34;&gt;exercise_04.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_05-sh&#34;&gt;exercise_05.sh&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/nav&gt;&lt;hr&gt;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_01-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_01.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-instructional&#34;&gt;instructional&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: /dev/sdb&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_5/exercise_01.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_5/exercise_01.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_01.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: instructional&#xA;# @requires: /dev/sdb&#xA;# @safe: yes&#xA;&#xA;# Exercise 1: Assuming you have a new, unpartitioned 20Gb disk named /dev/sdb. &#xA;# Use fdisk /dev/sdb to enter the interactive mode. Create a new DOS (MBR) partition table for the disk. &#xA;# Create one primary partition of 2 Gb and one extended partition. &#xA;# Within the extended partition, create two logical partitions of 500 MiB each.&#xA;#&#xA;# Task: Create MBR partition table with primary and logical partitions using fdisk.&#xA;#&#xA;# WARNING: This script requires a disk device and will modify it. Use with caution!&#xA;&#xA;echo &amp;quot;This script demonstrates the fdisk commands needed.&amp;quot;&#xA;echo &amp;quot;Run: sudo fdisk /dev/sdb&amp;quot;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;Commands to enter in fdisk:&amp;quot;&#xA;echo &amp;quot;n          - Create new partition&amp;quot;&#xA;echo &amp;quot;p          - Primary partition&amp;quot;&#xA;echo &amp;quot;1          - Partition number 1&amp;quot;&#xA;echo &amp;quot;[Enter]    - First sector (default)&amp;quot;&#xA;echo &amp;quot;+2G        - Size of 2GB&amp;quot;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;n          - Create new partition&amp;quot;&#xA;echo &amp;quot;e          - Extended partition&amp;quot;&#xA;echo &amp;quot;2          - Partition number 2&amp;quot;&#xA;echo &amp;quot;[Enter]    - First sector (default)&amp;quot;&#xA;echo &amp;quot;[Enter]    - Last sector (use remaining space)&amp;quot;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;n          - Create logical partition&amp;quot;&#xA;echo &amp;quot;[Enter]    - Accept logical partition&amp;quot;&#xA;echo &amp;quot;[Enter]    - First sector (default)&amp;quot;&#xA;echo &amp;quot;+500M      - Size of 500MB&amp;quot;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;n          - Create logical partition&amp;quot;&#xA;echo &amp;quot;[Enter]    - Accept logical partition&amp;quot;&#xA;echo &amp;quot;[Enter]    - First sector (default)&amp;quot;&#xA;echo &amp;quot;+500M      - Size of 500MB&amp;quot;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;p          - Print partition table&amp;quot;&#xA;echo &amp;quot;w          - Write changes and exit&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_02-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_02.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-instructional&#34;&gt;instructional&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: /dev/sdb&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_5/exercise_02.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_5/exercise_02.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_02.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: instructional&#xA;# @requires: /dev/sdb&#xA;# @safe: yes&#xA;&#xA;# Exercise 2: Convert partitions to LVM type if you used any other. From remaining space create another one.&#xA;#&#xA;# Task: Change partition types to Linux LVM (type 8e) and create additional partition.&#xA;#&#xA;# WARNING: This script requires a disk device. Use with caution!&#xA;&#xA;echo &amp;quot;This script demonstrates the fdisk commands needed.&amp;quot;&#xA;echo &amp;quot;Run: sudo fdisk /dev/sdb&amp;quot;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;Commands to enter in fdisk:&amp;quot;&#xA;echo &amp;quot;t          - Change partition type&amp;quot;&#xA;echo &amp;quot;1          - Partition number 1&amp;quot;&#xA;echo &amp;quot;8e         - Linux LVM type&amp;quot;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;t          - Change partition type&amp;quot;&#xA;echo &amp;quot;5          - Partition number 5&amp;quot;&#xA;echo &amp;quot;8e         - Linux LVM type&amp;quot;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;t          - Change partition type&amp;quot;&#xA;echo &amp;quot;6          - Partition number 6&amp;quot;&#xA;echo &amp;quot;8e         - Linux LVM type&amp;quot;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;n          - Create new partition&amp;quot;&#xA;echo &amp;quot;[Enter]    - Accept logical partition&amp;quot;&#xA;echo &amp;quot;[Enter]    - First sector (default)&amp;quot;&#xA;echo &amp;quot;[Enter]    - Last sector (use remaining space)&amp;quot;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;t          - Change partition type&amp;quot;&#xA;echo &amp;quot;7          - Partition number 7&amp;quot;&#xA;echo &amp;quot;8e         - Linux LVM type&amp;quot;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;p          - Print partition table&amp;quot;&#xA;echo &amp;quot;w          - Write changes and exit&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_03-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_03.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-unsafe&#34;&gt;safe: no&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: root, /dev/sdb&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_5/exercise_03.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_5/exercise_03.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_03.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: root, /dev/sdb&#xA;# @safe: no&#xA;set -euo pipefail&#xA;&#xA;# Exercise 3: Using the LVM partitions you created in a previous exercise, &#xA;# create physical volumes and include into vg01 group.&#xA;#&#xA;# Task: Initialize LVM physical volumes and create a volume group.&#xA;#&#xA;# WARNING: This will format the specified partitions. Use with caution!&#xA;&#xA;sudo pvcreate /dev/sdb{1,5,6,7}&#xA;&#xA;sudo vgcreate vg01 /dev/sdb{1,5,6,7}&#xA;&#xA;# Display the volume group information&#xA;sudo vgdisplay vg01&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_04-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_04.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-unsafe&#34;&gt;safe: no&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: root&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_5/exercise_04.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_5/exercise_04.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_04.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: root&#xA;# @safe: no&#xA;set -euo pipefail&#xA;&#xA;# Exercise 4: From the vg01 volume group, create a new logical volume named lv01 with a size of 3 GiB.&#xA;# Create a second logical volume named lv02 that uses 40% of the remaining free space in the volume group.&#xA;#&#xA;# Task: Create two logical volumes with different sizing methods.&#xA;&#xA;sudo lvcreate -n lv01 -L 3G vg01&#xA;&#xA;sudo lvcreate -n lv02 -l 40%FREE vg01&#xA;&#xA;# Display the logical volumes&#xA;sudo lvdisplay vg01&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_05-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_05.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-unsafe&#34;&gt;safe: no&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: root, /dev/sdb&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_5/exercise_05.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_5/exercise_05.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_05.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: root, /dev/sdb&#xA;# @safe: no&#xA;set -euo pipefail&#xA;&#xA;# Exercise 5: Delete all LVs and VG.&#xA;#&#xA;# Task: Clean up LVM configuration by removing logical volumes, volume groups, and physical volumes.&#xA;#&#xA;# WARNING: This will destroy data. Use with caution!&#xA;&#xA;# Remove logical volumes&#xA;sudo lvremove /dev/vg01/lv0{1,2}&#xA;&#xA;# Remove volume group&#xA;sudo vgremove vg01&#xA;&#xA;# Remove physical volumes&#xA;sudo pvremove /dev/sdb{1,5,6,7}&#xA;&#xA;echo &amp;quot;All LVM structures have been removed.&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;</description>
			</item>
			<item>
				<title>Chapter 6: Filesystems and Storage Answers</title>
				<link>https://markelov.dev/adminbook/chapter_6/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://markelov.dev/adminbook/chapter_6/</guid>
				<description>&lt;header class=&#34;site-header&#34;&gt;&#xA;    &lt;p&gt;&lt;a href=&#34;https://markelov.dev/adminbook/&#34;&gt;&amp;larr; All chapters&lt;/a&gt; · &lt;a href=&#34;https://link.springer.com/book/9798868822254&#34;&gt;Book&lt;/a&gt; · &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook&#34;&gt;Repository&lt;/a&gt;&lt;/p&gt;&#xA;    &lt;h1&gt;Chapter 6: Filesystems and Storage Answers&lt;/h1&gt;&#xA;    &lt;p class=&#34;muted&#34;&gt;Red Hat RHCSA 10 Study Companion: Getting Ready for the EX200 Exam by Andrey Markelov (May 2026).&lt;/p&gt;&#xA;  &lt;/header&gt;&#xA;  &lt;h2&gt;Topics&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;GPT partitioning (parted)&lt;/li&gt;&lt;li&gt;XFS filesystem&lt;/li&gt;&lt;li&gt;fstab configuration&lt;/li&gt;&lt;li&gt;SGID permissions&lt;/li&gt;&lt;li&gt;Swap files&lt;/li&gt;&lt;/ul&gt;&lt;nav class=&#34;toc&#34;&gt;&lt;h2&gt;Exercises&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&#34;#exercise_01-sh&#34;&gt;exercise_01.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_02-sh&#34;&gt;exercise_02.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_03-sh&#34;&gt;exercise_03.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_04-sh&#34;&gt;exercise_04.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_05-sh&#34;&gt;exercise_05.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_06-sh&#34;&gt;exercise_06.sh&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/nav&gt;&lt;hr&gt;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_01-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_01.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-instructional&#34;&gt;instructional&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: /dev/sdb&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_6/exercise_01.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_6/exercise_01.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_01.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: instructional&#xA;# @requires: /dev/sdb&#xA;# @safe: yes&#xA;&#xA;# Exercise 1: Use the parted command to create a new GPT partition table on a disk (e.g., /dev/sdb) &#xA;# and then create a new primary partition using 30% of the available space. &#xA;# Format this partition with the XFS file system.&#xA;#&#xA;# Task: Create GPT partition table, partition, and format with XFS.&#xA;#&#xA;# WARNING: This will erase all data on the disk. Use with caution!&#xA;&#xA;echo &amp;quot;This script demonstrates the parted commands needed.&amp;quot;&#xA;echo &amp;quot;Run: sudo parted /dev/sdb&amp;quot;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;Commands to enter in parted:&amp;quot;&#xA;echo &amp;quot;mktable gpt         - Create GPT partition table&amp;quot;&#xA;echo &amp;quot;mkpart primary xfs 0% 30%  - Create partition using 30% of space&amp;quot;&#xA;echo &amp;quot;print               - Display partition table&amp;quot;&#xA;echo &amp;quot;quit                - Exit parted&amp;quot;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;Then format the partition:&amp;quot;&#xA;echo &amp;quot;sudo mkfs.xfs /dev/sdb1&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_02-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_02.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-unsafe&#34;&gt;safe: no&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: root, /dev/sdb&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_6/exercise_02.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_6/exercise_02.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_02.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: root, /dev/sdb&#xA;# @safe: no&#xA;set -euo pipefail&#xA;&#xA;# Exercise 2: Modify the /etc/fstab file to ensure the new XFS partition mounts automatically &#xA;# to /mnt/newxfs every time the system boots. Use the partition&amp;#x27;s UUID for the entry.&#xA;#&#xA;# Task: Create mount point, get UUID, and add entry to /etc/fstab.&#xA;&#xA;# Create mount point&#xA;sudo mkdir -p /mnt/newxfs&#xA;&#xA;# Get the UUID of the partition&#xA;echo &amp;quot;UUID of /dev/sdb1:&amp;quot;&#xA;sudo blkid /dev/sdb1&#xA;&#xA;# Add entry to /etc/fstab&#xA;# Get the UUID from blkid output and add to fstab&#xA;UUID=$(sudo blkid -s UUID -o value /dev/sdb1)&#xA;echo &amp;quot;UUID=$UUID /mnt/newxfs xfs defaults 0 0&amp;quot; | sudo tee -a /etc/fstab&#xA;&#xA;# Verify fstab syntax&#xA;sudo findmnt --verify&#xA;&#xA;# Reload systemd and mount&#xA;sudo systemctl daemon-reload&#xA;sudo mount -a&#xA;&#xA;echo &amp;quot;Partition should now be mounted at /mnt/newxfs&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_03-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_03.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-instructional&#34;&gt;instructional&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: /dev/sdb&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_6/exercise_03.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_6/exercise_03.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_03.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: instructional&#xA;# @requires: /dev/sdb&#xA;# @safe: yes&#xA;&#xA;# Exercise 3: Use parted command to create a new partition with LVM type using 50% of the available space.&#xA;# Add partition to existing LVM group and extend / file system.&#xA;#&#xA;# Task: Create LVM partition, add to volume group, and extend root filesystem.&#xA;#&#xA;# WARNING: This modifies disk partitions and filesystems. Use with caution!&#xA;&#xA;echo &amp;quot;This script demonstrates the parted and LVM commands needed.&amp;quot;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;Step 1: Create partition with parted&amp;quot;&#xA;echo &amp;quot;Run: sudo parted /dev/sdb&amp;quot;&#xA;echo &amp;quot;mkpart primary 30% 80%&amp;quot;&#xA;echo &amp;quot;set 2 lvm on&amp;quot;&#xA;echo &amp;quot;print&amp;quot;&#xA;echo &amp;quot;quit&amp;quot;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;Step 2: Add to LVM&amp;quot;&#xA;echo &amp;quot;sudo vgextend rhel /dev/sdb2&amp;quot;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;Step 3: Extend logical volume and filesystem&amp;quot;&#xA;echo &amp;quot;sudo lvextend -l +100%FREE /dev/rhel/root&amp;quot;&#xA;echo &amp;quot;sudo xfs_growfs /&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_04-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_04.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_6/exercise_04.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_6/exercise_04.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_04.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Exercise 4: Use the lsblk --fs or blkid commands to list all file systems &#xA;# on your system and their corresponding UUIDs.&#xA;#&#xA;# Task: Display filesystem information for all block devices.&#xA;&#xA;echo &amp;quot;=== Using lsblk --fs ===&amp;quot;&#xA;sudo lsblk --fs&#xA;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;=== Using blkid ===&amp;quot;&#xA;sudo blkid&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_05-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_05.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-unsafe&#34;&gt;safe: no&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: root&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_6/exercise_05.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_6/exercise_05.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_05.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: root&#xA;# @safe: no&#xA;set -euo pipefail&#xA;&#xA;# Exercise 5: Create a directory /tmp/shared_project and a group named devops. &#xA;# Set the directory&amp;#x27;s group ownership to devops and apply the SGID bit. &#xA;# Add your user to the devops group and verify that any new files you create &#xA;# in that directory inherit the devops group ownership.&#xA;#&#xA;# Task: Create directory with SGID bit, configure group ownership, and test inheritance.&#xA;&#xA;# Create directory&#xA;sudo mkdir -p /tmp/shared_project&#xA;&#xA;# Create group&#xA;sudo groupadd devops&#xA;&#xA;# Set group ownership&#xA;sudo chgrp devops /tmp/shared_project&#xA;&#xA;# Set permissions with SGID bit (2770)&#xA;sudo chmod 2770 /tmp/shared_project&#xA;&#xA;# Add current user to devops group&#xA;sudo usermod -aG devops &amp;quot;$USER&amp;quot;&#xA;&#xA;# Display directory permissions&#xA;ls -ld /tmp/shared_project/&#xA;&#xA;# Switch to devops group context&#xA;newgrp devops &amp;lt;&amp;lt; EOF&#xA;# Create a test file&#xA;touch /tmp/shared_project/testfile&#xA;&#xA;# Verify group ownership&#xA;ls -l /tmp/shared_project/testfile&#xA;EOF&#xA;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;Verification complete. The testfile should have devops group ownership.&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_06-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_06.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-unsafe&#34;&gt;safe: no&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: root&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_6/exercise_06.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_6/exercise_06.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_06.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: root&#xA;# @safe: no&#xA;set -euo pipefail&#xA;&#xA;# Exercise 6: Create a 1 Gb file at /tmp/swapfile using dd. &#xA;# Use the mkswap command to format the file as a swap area. &#xA;# Activate the swap file with the swapon command and verify the new total swap size with free -h.&#xA;#&#xA;# Task: Create and activate a swap file.&#xA;&#xA;# Create 1 GB swap file&#xA;sudo dd if=/dev/zero of=/tmp/swapfile bs=1M count=1024&#xA;&#xA;# Set proper permissions (important for security)&#xA;sudo chmod 600 /tmp/swapfile&#xA;&#xA;# Format as swap&#xA;sudo mkswap /tmp/swapfile&#xA;&#xA;# Activate swap&#xA;sudo swapon /tmp/swapfile&#xA;&#xA;# Verify swap is active&#xA;free -h&#xA;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;Swap file created and activated. Use &amp;#x27;sudo swapoff /tmp/swapfile&amp;#x27; to deactivate.&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;</description>
			</item>
			<item>
				<title>Chapter 7: System Management Answers</title>
				<link>https://markelov.dev/adminbook/chapter_7/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://markelov.dev/adminbook/chapter_7/</guid>
				<description>&lt;header class=&#34;site-header&#34;&gt;&#xA;    &lt;p&gt;&lt;a href=&#34;https://markelov.dev/adminbook/&#34;&gt;&amp;larr; All chapters&lt;/a&gt; · &lt;a href=&#34;https://link.springer.com/book/9798868822254&#34;&gt;Book&lt;/a&gt; · &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook&#34;&gt;Repository&lt;/a&gt;&lt;/p&gt;&#xA;    &lt;h1&gt;Chapter 7: System Management Answers&lt;/h1&gt;&#xA;    &lt;p class=&#34;muted&#34;&gt;Red Hat RHCSA 10 Study Companion: Getting Ready for the EX200 Exam by Andrey Markelov (May 2026).&lt;/p&gt;&#xA;  &lt;/header&gt;&#xA;  &lt;h2&gt;Topics&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Systemd targets&lt;/li&gt;&lt;li&gt;Journal logs&lt;/li&gt;&lt;li&gt;Process management (ps, nice, renice)&lt;/li&gt;&lt;li&gt;TuneD profiles&lt;/li&gt;&lt;/ul&gt;&lt;nav class=&#34;toc&#34;&gt;&lt;h2&gt;Exercises&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&#34;#exercise_01-sh&#34;&gt;exercise_01.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_03-sh&#34;&gt;exercise_03.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_04-sh&#34;&gt;exercise_04.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_05-sh&#34;&gt;exercise_05.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_06-sh&#34;&gt;exercise_06.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_07-sh&#34;&gt;exercise_07.sh&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/nav&gt;&lt;hr&gt;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_01-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_01.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-unsafe&#34;&gt;safe: no&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: root&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_7/exercise_01.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_7/exercise_01.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_01.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: root&#xA;# @safe: no&#xA;set -euo pipefail&#xA;&#xA;# Exercise 1: Use systemctl to find the default systemd target on your system. &#xA;# Use systemctl to temporarily switch your system to multi-user.target.&#xA;#&#xA;# Task: Display current default target and switch to multi-user target.&#xA;&#xA;echo &amp;quot;Current default target:&amp;quot;&#xA;systemctl get-default&#xA;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;Switching to multi-user.target...&amp;quot;&#xA;sudo systemctl isolate multi-user.target&#xA;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;System is now in multi-user.target mode.&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_03-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_03.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_7/exercise_03.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_7/exercise_03.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_03.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Exercise 3: Examine the output of journalctl -b to review the messages from the most recent system boot.&#xA;#&#xA;# Task: Display system journal entries from the current boot.&#xA;&#xA;sudo journalctl -b&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_04-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_04.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_7/exercise_04.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_7/exercise_04.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_04.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Exercise 4: Use the ps command to identify the top 3 processes consuming the most CPU and memory.&#xA;#&#xA;# Task: List processes sorted by CPU and memory usage.&#xA;&#xA;echo &amp;quot;=== Top 3 CPU-consuming processes ===&amp;quot;&#xA;ps aux --sort=-%cpu | head -n 4&#xA;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;=== Top 3 Memory-consuming processes ===&amp;quot;&#xA;ps aux --sort=-%mem | head -n 4&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_05-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_05.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_7/exercise_05.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_7/exercise_05.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_05.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Exercise 5: Start a new process with a non-default nice value using the nice command, &#xA;# and then verify the change with ps.&#xA;#&#xA;# Task: Start a process with modified priority and verify it.&#xA;&#xA;# Start sleep process with nice value of 10&#xA;nice -n 10 sleep 3600 &amp;amp;&#xA;&#xA;PID=$!&#xA;echo &amp;quot;Started sleep process with PID: $PID and nice value 10&amp;quot;&#xA;&#xA;# Verify the nice value&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;Process information:&amp;quot;&#xA;ps lax | grep sleep | grep -v grep&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_06-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_06.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_7/exercise_06.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_7/exercise_06.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_06.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Exercise 6: Use renice to change the niceness of a running process, &#xA;# and then confirm the change with ps.&#xA;#&#xA;# Task: Modify the priority of an already running process.&#xA;&#xA;# First, we need a process to renice&#xA;# Start a sleep process in background&#xA;sleep 3600 &amp;amp;&#xA;PID=$!&#xA;&#xA;echo &amp;quot;Started process with PID: $PID&amp;quot;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;Original priority:&amp;quot;&#xA;ps lax | grep $PID | grep -v grep&#xA;&#xA;# Change the nice value to 15&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;Changing nice value to 15...&amp;quot;&#xA;renice -n 15 $PID&#xA;&#xA;# Verify the change&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;New priority:&amp;quot;&#xA;ps lax | grep $PID | grep -v grep&#xA;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;To kill this process, run: kill $PID&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_07-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_07.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-unsafe&#34;&gt;safe: no&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: root&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_7/exercise_07.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_7/exercise_07.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_07.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: root&#xA;# @safe: no&#xA;set -euo pipefail&#xA;&#xA;# Exercise 7: Use tuned-adm active to determine which performance profile is currently active on your system. &#xA;# Switch the active TuneD profile to throughput-performance using the tuned-adm profile command.&#xA;#&#xA;# Task: Check current TuneD profile and switch to throughput-performance.&#xA;&#xA;echo &amp;quot;Current active TuneD profile:&amp;quot;&#xA;tuned-adm active&#xA;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;Switching to throughput-performance profile...&amp;quot;&#xA;sudo tuned-adm profile throughput-performance&#xA;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;New active profile:&amp;quot;&#xA;tuned-adm active&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;</description>
			</item>
			<item>
				<title>Chapter 8: Task Scheduling and Remote Access Answers</title>
				<link>https://markelov.dev/adminbook/chapter_8/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://markelov.dev/adminbook/chapter_8/</guid>
				<description>&lt;header class=&#34;site-header&#34;&gt;&#xA;    &lt;p&gt;&lt;a href=&#34;https://markelov.dev/adminbook/&#34;&gt;&amp;larr; All chapters&lt;/a&gt; · &lt;a href=&#34;https://link.springer.com/book/9798868822254&#34;&gt;Book&lt;/a&gt; · &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook&#34;&gt;Repository&lt;/a&gt;&lt;/p&gt;&#xA;    &lt;h1&gt;Chapter 8: Task Scheduling and Remote Access Answers&lt;/h1&gt;&#xA;    &lt;p class=&#34;muted&#34;&gt;Red Hat RHCSA 10 Study Companion: Getting Ready for the EX200 Exam by Andrey Markelov (May 2026).&lt;/p&gt;&#xA;  &lt;/header&gt;&#xA;  &lt;h2&gt;Topics&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Background jobs&lt;/li&gt;&lt;li&gt;at command&lt;/li&gt;&lt;li&gt;Cron jobs&lt;/li&gt;&lt;li&gt;Time management (timedatectl)&lt;/li&gt;&lt;li&gt;SSH key generation and configuration&lt;/li&gt;&lt;/ul&gt;&lt;nav class=&#34;toc&#34;&gt;&lt;h2&gt;Exercises&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&#34;#exercise_01-sh&#34;&gt;exercise_01.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_02-sh&#34;&gt;exercise_02.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_03-sh&#34;&gt;exercise_03.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_04-sh&#34;&gt;exercise_04.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_05-sh&#34;&gt;exercise_05.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_06-sh&#34;&gt;exercise_06.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_07-sh&#34;&gt;exercise_07.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_08-sh&#34;&gt;exercise_08.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_09-sh&#34;&gt;exercise_09.sh&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/nav&gt;&lt;hr&gt;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_01-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_01.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_8/exercise_01.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_8/exercise_01.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_01.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Exercise 1: Execute the sleep 1200 command in the background. &#xA;# Immediately verify it is running, and then note its job number.&#xA;#&#xA;# Task: Start a background job and verify its status.&#xA;&#xA;# Start sleep in background&#xA;sleep 1200 &amp;amp;&#xA;&#xA;echo &amp;quot;Sleep process started in background.&amp;quot;&#xA;echo &amp;quot;&amp;quot;&#xA;&#xA;# List jobs with PID&#xA;jobs -l&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_02-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_02.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_8/exercise_02.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_8/exercise_02.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_02.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Exercise 2: Start a ping 127.0.0.1 process in the foreground. &#xA;# Stop it using the appropriate key sequence, and then send the stopped process &#xA;# to the background so it resumes running.&#xA;#&#xA;# Task: Demonstrate job control - stopping and backgrounding a process.&#xA;&#xA;echo &amp;quot;Starting ping in foreground...&amp;quot;&#xA;echo &amp;quot;Press Ctrl+Z to stop it, then run: bg %1&amp;quot;&#xA;echo &amp;quot;&amp;quot;&#xA;&#xA;# Start ping process&#xA;ping 127.0.0.1&#xA;&#xA;# After Ctrl+Z is pressed, the user would run:&#xA;# jobs&#xA;# bg 1&#xA;# jobs&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_03-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_03.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_8/exercise_03.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_8/exercise_03.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_03.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Exercise 3: Schedule a command using at to execute 5 minutes from now. &#xA;# The command should redirect the output of date to a file named ~/test_output.txt.&#xA;#&#xA;# Task: Schedule a one-time task using the at command.&#xA;&#xA;# Schedule the job&#xA;at now + 5 minutes &amp;lt;&amp;lt; EOF&#xA;date &amp;gt; ~/test_output.txt&#xA;EOF&#xA;&#xA;echo &amp;quot;Job scheduled to run in 5 minutes.&amp;quot;&#xA;echo &amp;quot;The output will be saved to ~/test_output.txt&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_04-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_04.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_8/exercise_04.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_8/exercise_04.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_04.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Exercise 4: Immediately after scheduling the job, use the command to view the job queue.&#xA;#&#xA;# Task: Display scheduled at jobs.&#xA;&#xA;atq&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_05-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_05.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_8/exercise_05.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_8/exercise_05.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_05.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Exercise 5: Edit your user&amp;#x27;s crontab file to run the command &#xA;# /bin/echo &amp;quot;Cron!&amp;quot; &amp;gt; ~/cron.log every day at 9:00.&#xA;#&#xA;# Task: Create a cron job that runs daily at 9 AM.&#xA;&#xA;echo &amp;quot;Adding cron job...&amp;quot;&#xA;&#xA;# Add the cron job&#xA;(crontab -l 2&amp;gt;/dev/null; echo &amp;quot;0 9 * * * /bin/echo \&amp;quot;Cron!\&amp;quot; &amp;gt; ~/cron.log&amp;quot;) | crontab -&#xA;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;Current crontab:&amp;quot;&#xA;crontab -l&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_06-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_06.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_8/exercise_06.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_8/exercise_06.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_06.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Exercise 6: Use the Systemd utility to display the current system time, &#xA;# time zone, and the status of the NTP service.&#xA;#&#xA;# Task: Display time and NTP synchronization status.&#xA;&#xA;timedatectl&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_07-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_07.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_8/exercise_07.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_8/exercise_07.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_07.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Exercise 7: Generate a new key pair. Use a strong passphrase for security. &#xA;# What are the names of the two files created in your ~/.ssh/ directory?&#xA;#&#xA;# Task: Generate SSH key pair and identify the created files.&#xA;&#xA;echo &amp;quot;Generating SSH key pair...&amp;quot;&#xA;ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519&#xA;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;Files created in ~/.ssh/:&amp;quot;&#xA;ls -la ~/.ssh/id_ed25519*&#xA;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;The two files are:&amp;quot;&#xA;echo &amp;quot;1. id_ed25519 (private key)&amp;quot;&#xA;echo &amp;quot;2. id_ed25519.pub (public key)&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_08-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_08.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_8/exercise_08.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_8/exercise_08.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_08.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Exercise 8: You need to enable key-based authentication for the user root on the local server 127.0.0.1. &#xA;# Use the specialized utility to securely copy your users&amp;#x27; public key to the server.&#xA;#&#xA;# Task: Copy SSH public key to remote server for key-based authentication.&#xA;&#xA;ssh-copy-id -i ~/.ssh/id_ed25519.pub root@127.0.0.1&#xA;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;Note: This will work if PermitRootLogin is enabled in the SSH server configuration.&amp;quot;&#xA;echo &amp;quot;For a separate VM, you may need to modify /etc/ssh/sshd_config:&amp;quot;&#xA;echo &amp;quot;  PermitRootLogin yes&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_09-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_09.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-unsafe&#34;&gt;safe: no&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: root&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_8/exercise_09.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_8/exercise_09.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_09.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: root&#xA;# @safe: no&#xA;set -euo pipefail&#xA;&#xA;# Exercise 9: Which two lines would you modify in the main OpenSSH server configuration file &#xA;# (/etc/ssh/sshd_config) to disable password authentication and prevent the root user &#xA;# from logging in directly?&#xA;#&#xA;# Task: Display the SSH configuration changes needed for improved security.&#xA;&#xA;echo &amp;quot;To disable password authentication and prevent root login,&amp;quot;&#xA;echo &amp;quot;modify these lines in /etc/ssh/sshd_config:&amp;quot;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;PasswordAuthentication no&amp;quot;&#xA;echo &amp;quot;PermitRootLogin no&amp;quot;&#xA;echo &amp;quot;&amp;quot;&#xA;echo &amp;quot;After making changes, restart sshd:&amp;quot;&#xA;echo &amp;quot;sudo systemctl restart sshd&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;</description>
			</item>
			<item>
				<title>Chapter 9: Package Management Answers</title>
				<link>https://markelov.dev/adminbook/chapter_9/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://markelov.dev/adminbook/chapter_9/</guid>
				<description>&lt;header class=&#34;site-header&#34;&gt;&#xA;    &lt;p&gt;&lt;a href=&#34;https://markelov.dev/adminbook/&#34;&gt;&amp;larr; All chapters&lt;/a&gt; · &lt;a href=&#34;https://link.springer.com/book/9798868822254&#34;&gt;Book&lt;/a&gt; · &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook&#34;&gt;Repository&lt;/a&gt;&lt;/p&gt;&#xA;    &lt;h1&gt;Chapter 9: Package Management Answers&lt;/h1&gt;&#xA;    &lt;p class=&#34;muted&#34;&gt;Red Hat RHCSA 10 Study Companion: Getting Ready for the EX200 Exam by Andrey Markelov (May 2026).&lt;/p&gt;&#xA;  &lt;/header&gt;&#xA;  &lt;h2&gt;Topics&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;DNF operations&lt;/li&gt;&lt;li&gt;RPM queries&lt;/li&gt;&lt;li&gt;Repository management&lt;/li&gt;&lt;li&gt;Flatpak applications&lt;/li&gt;&lt;/ul&gt;&lt;nav class=&#34;toc&#34;&gt;&lt;h2&gt;Exercises&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&#34;#exercise_01-sh&#34;&gt;exercise_01.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_02-sh&#34;&gt;exercise_02.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_03-sh&#34;&gt;exercise_03.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_04-sh&#34;&gt;exercise_04.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_05-sh&#34;&gt;exercise_05.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_06-sh&#34;&gt;exercise_06.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_07-sh&#34;&gt;exercise_07.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_08-sh&#34;&gt;exercise_08.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_09-sh&#34;&gt;exercise_09.sh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#exercise_10-sh&#34;&gt;exercise_10.sh&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/nav&gt;&lt;hr&gt;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_01-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_01.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_9/exercise_01.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_9/exercise_01.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_01.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Exercise 1: Use DNF to search for packages related to the &amp;quot;network&amp;quot; term, &#xA;# listing only packages that are not yet installed.&#xA;#&#xA;# Task: Search for available network-related packages.&#xA;&#xA;sudo dnf list available *network*&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_02-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_02.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-unsafe&#34;&gt;safe: no&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: root&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_9/exercise_02.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_9/exercise_02.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_02.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: root&#xA;# @safe: no&#xA;set -euo pipefail&#xA;&#xA;# Exercise 2: Install the zsh package using DNF, ensuring the installation proceeds &#xA;# without any interactive prompts.&#xA;#&#xA;# Task: Install zsh package non-interactively.&#xA;&#xA;sudo dnf install -y zsh&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_03-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_03.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-unsafe&#34;&gt;safe: no&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: root&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_9/exercise_03.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_9/exercise_03.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_03.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: root&#xA;# @safe: no&#xA;set -euo pipefail&#xA;&#xA;# Exercise 3: Remove the zsh package and any dependencies that are no longer needed, &#xA;# using a single DNF command.&#xA;#&#xA;# Task: Uninstall zsh and clean up unused dependencies.&#xA;&#xA;sudo dnf remove -y zsh&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_04-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_04.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-unsafe&#34;&gt;safe: no&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: root&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_9/exercise_04.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_9/exercise_04.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_04.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: root&#xA;# @safe: no&#xA;set -euo pipefail&#xA;&#xA;# Exercise 4: Display a detailed description and list of packages (mandatory, default, and optional) &#xA;# included in the &amp;quot;Legacy UNIX Compatibility&amp;quot; package group.&#xA;#&#xA;# Task: Show information about a package group.&#xA;&#xA;sudo dnf group info &amp;quot;Legacy UNIX Compatibility&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_05-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_05.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_9/exercise_05.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_9/exercise_05.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_05.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Exercise 5: Determine which installed RPM package owns the /etc/filesystems file.&#xA;#&#xA;# Task: Find the package that provides a specific file.&#xA;&#xA;rpm -qf /etc/filesystems&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_06-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_06.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_9/exercise_06.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_9/exercise_06.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_06.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Exercise 6: Use the rpm command to list all files included in the installed bash package.&#xA;#&#xA;# Task: Display all files provided by the bash package.&#xA;&#xA;sudo rpm -ql bash&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_07-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_07.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-unsafe&#34;&gt;safe: no&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: root&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_9/exercise_07.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_9/exercise_07.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_07.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: root&#xA;# @safe: no&#xA;set -euo pipefail&#xA;&#xA;# Exercise 7: Use the dnf config-manager utility to enable the &#xA;# codeready-builder-for-rhel-10-x86_64-rpms repository.&#xA;#&#xA;# Task: Enable a DNF repository.&#xA;&#xA;sudo dnf config-manager --enable codeready-builder-for-rhel-10-x86_64-rpms&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_08-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_08.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-unsafe&#34;&gt;safe: no&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: root&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_9/exercise_08.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_9/exercise_08.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_08.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: root&#xA;# @safe: no&#xA;set -euo pipefail&#xA;&#xA;# Exercise 8: Install virt-manager package.&#xA;#&#xA;# Task: Install the virt-manager virtualization management tool.&#xA;&#xA;sudo dnf install -y virt-manager&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_09-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_09.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-safe&#34;&gt;safe: yes&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_9/exercise_09.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_9/exercise_09.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_09.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: none&#xA;# @safe: yes&#xA;set -euo pipefail&#xA;&#xA;# Exercise 9: Write the flatpak command to add the Flathub remote repository only &#xA;# for the current user, without system-wide privileges, and only if the remote doesn&amp;#x27;t already exist.&#xA;#&#xA;# Task: Add Flathub repository for user-level flatpak installations.&#xA;&#xA;flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo&#xA;&#xA;echo &amp;quot;Flathub repository added for current user.&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;section class=&#34;exercise&#34; id=&#34;exercise_10-sh&#34;&gt;&#xA;  &lt;div class=&#34;exercise-header&#34;&gt;&#xA;    &lt;h2&gt;exercise_10.sh&lt;/h2&gt;&#xA;    &lt;span class=&#34;badge badge-executable&#34;&gt;executable&lt;/span&gt; &lt;span class=&#34;badge badge-unsafe&#34;&gt;safe: no&lt;/span&gt; &lt;span class=&#34;badge badge-executable&#34;&gt;requires: root&lt;/span&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;actions&#34;&gt;&#xA;    &lt;a href=&#34;https://markelov.dev/adminbook/scripts/chapter_9/exercise_10.sh&#34; download&gt;Download .sh&lt;/a&gt;&#xA;    &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook/blob/main/chapter_9/exercise_10.sh&#34;&gt;View on GitHub&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;code-wrap&#34;&gt;&#xA;    &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34; aria-label=&#34;Copy code for exercise_10.sh&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash&#xA;# @type: executable&#xA;# @requires: root&#xA;# @safe: no&#xA;set -euo pipefail&#xA;&#xA;# Exercise 10: Install Gimp from Flathub.&#xA;#&#xA;# Task: Install the GIMP image editor using flatpak.&#xA;&#xA;flatpak install flathub org.gimp.GIMP&#xA;&#xA;echo &amp;quot;GIMP has been installed via Flatpak.&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/section&gt;</description>
			</item>
			<item>
				<title>Practice Lab: Installing RHEL 10 in a VM</title>
				<link>https://markelov.dev/adminbook/lab-vm-setup/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://markelov.dev/adminbook/lab-vm-setup/</guid>
				<description>&lt;header class=&#34;site-header&#34;&gt;&#xA;    &lt;p&gt;&lt;a href=&#34;https://markelov.dev/adminbook/&#34;&gt;&amp;larr; All chapters&lt;/a&gt; · &lt;a href=&#34;https://link.springer.com/book/9798868822254&#34;&gt;Book&lt;/a&gt; · &lt;a href=&#34;https://github.com/andreyamarkelov/adminbook&#34;&gt;Repository&lt;/a&gt;&lt;/p&gt;&#xA;    &lt;h1&gt;Practice Lab: Installing RHEL 10 in a VM&lt;/h1&gt;&#xA;    &lt;p class=&#34;muted&#34;&gt;Red Hat RHCSA 10 Study Companion: Getting Ready for the EX200 Exam by Andrey Markelov (May 2026).&lt;/p&gt;&#xA;  &lt;/header&gt;&#xA;  &lt;nav class=&#34;guide-toc&#34;&gt;&lt;h2&gt;On this page&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&#34;#overview&#34;&gt;What you need&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#iso&#34;&gt;Get the installation image&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#boot-menu&#34;&gt;Boot the installer&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#installer-hub&#34;&gt;Walk through the installer hub&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#registration&#34;&gt;Register with Red Hat&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;#finish&#34;&gt;Finish and prepare for exercises&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/nav&gt;&lt;hr&gt;&lt;section class=&#34;guide-section&#34; id=&#34;overview&#34;&gt;&lt;h2&gt;What you need&lt;/h2&gt;&lt;p&gt;Most exercises in this companion repo assume a single throwaway machine running Red Hat Enterprise Linux 10. A practical starting point is &lt;strong&gt;2–4 virtual CPUs&lt;/strong&gt;, &lt;strong&gt;at least 1.5 GiB RAM&lt;/strong&gt;, and &lt;strong&gt;10 GiB disk&lt;/strong&gt;. A few storage topics are easier with a second disk (many answer scripts refer to `/dev/sdb`), but you can still practice on one VM if you attach an extra virtual disk later.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
