RHCSA9 Exam Series: Understand and use essential tools

RHCSA9 Exam Series: Understand and use essential tools

In this section of the RHCSA9 Exam Series: Understand and use essential tools, we will examine some of the essential tools that may appear on the RHCSA9 exam and review different ways to accomplish administrative tasks within RHEL9 operating system (OS). Some of the commands we will review in this lab include:

  • mkdir
  • rmdir
  • rm
  • find
  • ls
  • mv
  • cp
  • cd
  • touch
  • pipes
  • exec
  • pwd
  • redirection
  • chmod
  • useradd
  • chown
  • umask
  • tar
  • gzip

Table of Contents

Introduction

Before we begin, this article assumes that you already have running instances of RHEL9 or CentOS9 available. If not, you may reference the following articles for RHEL7 or CentOS8 installation procedures. You’ll find the instructions for installing RHEL9 are similar with a few obvious exceptions (e.g. you’ll download a different .iso).

RHCSA9 Exam Series - Understand and use essential tools

Image by Miguel A. Padrinan from Pexels

Lab Objectives: Environment Setup

To adhere completely to the lab instructions, you’ll need one running instance or virtual machine (also referred to as a node). You can name it whatever you want but for simplicity sake, we’ll name this machine as follows:
				
					* node1.infotechys.example.com
				
			

**READ ALL OF THE INSTRUCTIONS BEFORE STARTING THE LAB**

Also, make sure to save off an image backup of your node or take a snapshot of the machine’s state before starting this lab. It will allow you to revert to a clean slate and repeat the labs as many times as you need.

RHCSA9 Exam Series: Lab Instructions

Complete each bullet (below) on your machine (node1) as the root user.

Section #1: 10-15 minutes

  • Create a directory under /opt called next_project_files
  • Under the newly created directory, create twenty(20) text files in sequential order (e.g file1.txt, file2.txt, file3.txt, etc…)
  • Redirect the output of the df -Ph command into the first three(3) text files (e.g. file1-3.txt)
  • List the /etc directory and redirect its contents into file4-8.txt
  • List the /usr/local directory and redirect its contents into file9.txt and file10.txt
  • Rename file4-10.txt to systemfile4-10.data
  • Append the word count output of each of the following .data files to file4.txt
    • systemfile4.data
    • systemfile5.data
    • systemfile6.data
  • Redirect the first line in file4.txt to file5.txt
  • Append the word count output of systemsfile9.data to file5.txt
  • Redirect a list of only files with the keyword .conf from systemfile6.data to file6.txt
  • Redirect the word count output of file6.txt to file7.txt

Section #2: 10-15 minutes

  • Create a new directory under next_project_files called modified
  • Under the modified directory, redirect all files with the .data extension to file8.txt
  • Under the modified directory, redirect all setuid files to file9.txt
  • Under the modified directory, redirect all setgid files to file10.txt
  • Under the modified directory, redirect the contents of file8, 9, and 10 to file11.txt
  • Redirect the word count output of file11.txt to file12.txt
  • Remove file11.txt and file12.txt from the next_project_files directory
  • Remove all empty files from the next_project_files directory and move all remaining files with a .txt extension to the modified directory.
  • Archive the contents of next_project_files to a file called projects.tgz
  • Create a new user called testuser
  • Copy the archived file to testuser’s home directory
  • Set the umask for testuser so that only the owner and group have read and write permissions.
  • Set the permissions for the archived file so the owner has read and write permissions; set the group permissions to read only permissions; set no permissions to others.
NOTE: Challenge yourself!  Set a timer before starting this lab and try to complete the tasks above in 20 minutes or less. The RHCSA exam is three(3) hours long which is plenty of time if you manage it wisely!

Conclusion

Congratulations! You’ve just completed the Understand and use essential tools section of the RHCSA9 exam series. If it took you a while to complete, keep practicing until you can get it done in a shorter time period. Click this link for the answer page and compare your results. Was this article helpful to you? If so, leave us some feedback in the comments section. We’d love to hear from you.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *