RHCSA Red Hat Enterprise Linux 9 Certification Study Guide EX200 (2023)

Prepare for success with RHCSA Red Hat Enterprise Linux 9 Certification Study Guide EX200 (2023), a comprehensive guide to your certification test.

David Rodriguez
Contributor
4.6
80
about 1 year ago
Preview (31 of 527 Pages)
100%
Log in to unlock

Page 1

RHCSA Red Hat Enterprise Linux 9 Certification Study Guide EX200 (2023) - Page 1 preview image

Loading page ...

Page 2

RHCSA Red Hat Enterprise Linux 9 Certification Study Guide EX200 (2023) - Page 2 preview image

Loading page ...

Page 3

RHCSA Red Hat Enterprise Linux 9 Certification Study Guide EX200 (2023) - Page 3 preview image

Loading page ...

RHCSA®Red Hat®Enterprise Linux®9Certification Study Guide(Exam EX200)

Page 4

RHCSA Red Hat Enterprise Linux 9 Certification Study Guide EX200 (2023) - Page 4 preview image

Loading page ...

This page intentionally left blank

Page 5

RHCSA Red Hat Enterprise Linux 9 Certification Study Guide EX200 (2023) - Page 5 preview image

Loading page ...

McGraw Hill is an independent entity from Red Hat®, Inc. and is not affiliated with RedHat, Inc. in any manner. This study/training guide and/or material is not sponsoredby, endorsed by, or affiliated with Red Hat, Inc. in any manner. This publication andaccompanying media may be used in assisting students to prepare for a Red HatRHCSA certification exam. Neither Red Hat nor McGraw Hill warrant that use of thispublication and accompanying media will ensure passing any exam. Red Hat®, Red HatEnterprise Linux®, RHCE®, RHCSA®, and the Red Hat logo and Red Hat “Shadowman”logo are trademarks or registered trademarks of Red Hat, Inc. in the United States andcertain other countries. All other trademarks are trademarks of their respective owners.Michael JangAlessandro OrsariaNew YorkChicagoSan FranciscoAthensLondonMadridMexico CityMilanNew DelhiSingaporeSydneyTorontoRHCSA®Red Hat®Enterprise Linux®9Certification Study Guide,Eighth Edition (Exam EX200)

Page 6

RHCSA Red Hat Enterprise Linux 9 Certification Study Guide EX200 (2023) - Page 6 preview image

Loading page ...

Copyright © 2024 by McGraw Hill. All rights reserved. Except as permitted under the Copyright Act of 1976, no part of thispublication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, withoutthe prior written permission of publisher, with the exception that the program listings may be entered, stored, and executed in acomputer system, but they may not be reproduced for publication.ISBN: 978-1-26-046208-1MHID:1-26-046208-0The material in this eBook also appears in the print version of this title: ISBN: 978-1-26-046207-4, MHID: 1-26-046207-2.eBook conversion by codeMantraVersion 1.0All trademarks are trademarks of their respective owners. Rather than put a trademark symbol after every occurrence of a trade-marked name, we use names in an editorial fashion only, and to the benefit of the trademark owner, with no intention of infringe-ment of the trademark. Where such designations appear in this book, they have been printed with initial caps.McGraw Hill eBooks are available at special quantity discounts to use as premiums and sales promotions or for use in corporatetraining programs. To contact a representative, please visit the Contact Us page at www.mhprofessional.com.Information has been obtained by McGraw Hill from sources believed to be reliable. However, because of the possibility of hu-man or mechanical error by our sources, McGraw Hill, or others, McGraw Hill does not guarantee the accuracy, adequacy, orcompleteness of any information and is not responsible for any errors or omissions or the results obtained from the use of suchinformation.TERMS OF USEThis is a copyrighted work and McGraw Hill (“McGraw Hill”) and its licensors reserve all rights in and to the work. Use of thiswork is subject to these terms. Except as permitted under the Copyright Act of 1976 and the right to store and retrieve one copyof the work, you may not decompile, disassemble, reverse engineer, reproduce, modify, create derivative works based upon,transmit, distribute, disseminate, sell, publish or sublicense the work or any part of it without McGraw Hill’s prior consent. Youmay use the work for your own noncommercial and personal use; any other use of the work is strictly prohibited. Your right touse the work may be terminated if you fail to comply with these terms.THE WORK IS PROVIDED “AS IS.” McGRAW HILL AND ITS LICENSORS MAKE NO GUARANTEES OR WARRAN-TIES AS TO THE ACCURACY, ADEQUACY OR COMPLETENESS OF OR RESULTS TO BE OBTAINED FROM USINGTHE WORK, INCLUDING ANY INFORMATION THAT CAN BE ACCESSED THROUGH THE WORK VIA HYPERLINKOR OTHERWISE, AND EXPRESSLY DISCLAIM ANY WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOTLIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.McGraw Hill and its licensors do not warrant or guarantee that the functions contained in the work will meet your requirementsor that its operation will be uninterrupted or error free. Neither McGraw Hill nor its licensors shall be liable to you or anyone elsefor any inaccuracy, error or omission, regardless of cause, in the work or for any damages resulting therefrom. McGraw Hill hasno responsibility for the content of any information accessed through the work. Under no circumstances shall McGraw Hill and/or its licensors be liable for any indirect, incidental, special, punitive, consequential or similar damages that result from the use ofor inability to use the work, even if any of them has been advised of the possibility of such damages. This limitation of liabilityshall apply to any claim or cause whatsoever whether such claim or cause arises in contract, tort or otherwise.

Page 7

RHCSA Red Hat Enterprise Linux 9 Certification Study Guide EX200 (2023) - Page 7 preview image

Loading page ...

For the young widows and widowers:may they find the courage to face their fears,to navigate their way through the pain,and to find hope for a brighter future.

Page 8

RHCSA Red Hat Enterprise Linux 9 Certification Study Guide EX200 (2023) - Page 8 preview image

Loading page ...

ABOUT THE AUTHORSMichael Jang(RHCE, LPIC-2, UCP, LCP, Linux+, MCP) is currently a Lead TechnicalWriter for Forescout. His experience with computers goes back to the days of jumbledpunch cards. He has written other books on Linux certification, includingLPIC-1 inDepth,Mike Meyers’ Linux+ Certification Passport, andSair GNU/Linux Installation andConfiguration Exam Cram. His other Linux books includeLinux Annoyances for Geeks,Linux Patch Management, andSecurity Strategies in Linux Platforms and Applications.Hehas also written or contributed to books on Microsoft operating systems, includingMCSEGuide to Microsoft Windows 98andMastering Windows XP Professional, Second Edition.Alessandro Orsaria(RHCE, RHCA, CCIE x 2) is an IT professional with more than20 years’ experience in the industry. He has authored articles for technical Linux magazinesand is currently employed by a proprietary trading firm. Alessandro is Red Hat RHCE andRHCA certified and has achieved two Cisco CCIE certifications in Routing & Switching andDatacenter. He holds an MBA from Imperial College of London and a degree in physics.About the Technical EditorSam Doran is a Principal Software Engineer at Red Hat. He served in the U.S. Air Forceas an aircraft mechanic and is a proud alumnus of the Virginia Tech Corps of Cadets.Prior to joining Red Hat, he worked for the U.S. government as well as private industry injobs ranging from site reliability engineering to information security. He has used RHELprofessionally since 2003 as well as a number of other Linux distributions.

Page 9

RHCSA Red Hat Enterprise Linux 9 Certification Study Guide EX200 (2023) - Page 9 preview image

Loading page ...

viiCONTENTS AT A GLANCE1Prepare for the Red Hat RHCSA Certification................................12Fundamental Command-Line Skills.............................................433Managing Basic Networking......................................................914Software Management.............................................................1275systemd and the Boot Process....................................................1736User Administration................................................................2157Storage and Filesystem Administration.........................................2538Linux Security........................................................................3119System Administration Tasks.....................................................35310An Introduction to Containers...................................................405APrepare a System for the Sample Exams........................................447BSolutions to RHCSA Sample Exam 1............................................451CSolutions to RHCSA Sample Exam 2............................................459DAbout the Online Content.........................................................467Index...................................................................................471

Page 10

RHCSA Red Hat Enterprise Linux 9 Certification Study Guide EX200 (2023) - Page 10 preview image

Loading page ...

This page intentionally left blank

Page 11

RHCSA Red Hat Enterprise Linux 9 Certification Study Guide EX200 (2023) - Page 11 preview image

Loading page ...

ixCONTENTSAcknowledgments.....................................................................xixPreface...................................................................................xxiIntroduction............................................................................xxixRHCSA Exam Readiness Checklist................................................xxxii1Prepare for the Red Hat RHCSA Certification.................1The RHCSA Exam..................................................................4The Exam Experience...................................................4Evolving Requirements..................................................5Basic Hardware Requirements....................................................5Hardware Compatibility................................................6Architectures..............................................................6RAM Requirements......................................................7Storage Options...........................................................7Networking................................................................8Virtual Machine Options...............................................8Get Red Hat Enterprise Linux....................................................9Get a Subscription at No Cost.........................................10Purchase a Subscription.................................................10Third-Party Rebuilds....................................................10Check the Download....................................................11Exercise 1-1:Get Red Hat Enterprise Linux.....................12An Environment for Practice Labs...............................................12System Roles...............................................................14Getting VMware Workstation Player.................................14Virtual Networks on a Hypervisor....................................16Configure a Virtual Machine on VMware Workstation Player...18RHEL 9 Installation.................................................................22Boot Media................................................................22Basic Installation Steps..................................................24The Installation Perspective on Partitions...........................27Partition Creation Exercise.............................................30Exercise 1-2:Partitioning During Installation...................32Wow, Look at All That Software!......................................34Baseline Packages.........................................................35During the Installation..................................................35

Page 12

RHCSA Red Hat Enterprise Linux 9 Certification Study Guide EX200 (2023) - Page 12 preview image

Loading page ...

xRHCSA Red Hat Enterprise Linux 9 Certification Study GuideInitial Setup................................................................36Certification Summary..................................................37Two-Minute Drill.........................................................38Q&ASelf Test.....................................................................39Lab Questions.............................................................40Self Test Answers.........................................................41Lab Answers...............................................................422Fundamental Command-Line Skills............................43Shells...................................................................................46Other Shells...............................................................46Virtual Consoles..........................................................47GUI Shell Interfaces......................................................47Differences Between Regular and Administrative Users..........49Standard Streams and Command Redirection.....................49Standard Command-Line Tools..................................................51File and Directory Concepts...........................................52File Lists and ls............................................................54File-Creation Commands...............................................55Wildcards..................................................................58File Searches...............................................................59File Permissions......................................................................60File Permissions and Ownership......................................60Commands to Change Permissions and Ownership..............63A Basic Introduction of User and Group Concepts................66Managing Text Files.................................................................68Commands to Read Text Streams.....................................68Commands to Process Text Streams..................................70Edit Text Files at the Console..........................................73Exercise 2-1:Using vi to Create a New User.....................75If You Don’t Like vi.......................................................77Edit Text Files in the GUI...............................................78Accessing the Documentation....................................................78When You Need Help...................................................79A Variety of man Pages..................................................80The info Manuals.........................................................81Detailed Documentation in /usr/share/doc.........................81Certification Summary..................................................82Two-Minute Drill.........................................................83Q&ASelf Test.....................................................................85Lab Questions.............................................................86Self Test Answers.........................................................86Lab Answers...............................................................87

Page 13

RHCSA Red Hat Enterprise Linux 9 Certification Study Guide EX200 (2023) - Page 13 preview image

Loading page ...

Contentsxi3Managing Basic Networking....................................91A Networking Primer...............................................................93IPv4 Networks............................................................93Networks and Routing...................................................94Tools and Commands...................................................95Network Configuration and Troubleshooting.................................101Network Configuration Services......................................101Network Configuration Tools..........................................103Exercise 3-1:Configure IPv4 Settings on a Network Interface...105Configure Name Resolution............................................109Hostname Configuration Files.........................................109An Introduction to IPv6...........................................................111Basic IPv6 Addressing...................................................111Troubleshooting Tools..................................................113Configure IPv6 Addresses..............................................114Administration with Secure Shell and Secure Copy..........................115Command-Line Access..................................................116More SSH Command-Line Tools.....................................117Graphical Secure Shell Access.........................................117Certification Summary..................................................119Two-Minute Drill.........................................................119Q&ASelf Test.....................................................................120Lab Questions.............................................................121Self Test Answers.........................................................122Lab Answers...............................................................1234Software Management..........................................127The RPM Package Manager.......................................................129What Is a Package?.......................................................129What Is the RPM Database?............................................130What Is a Repository?...................................................130Install an RPM Package.................................................131Uninstall an RPM Package..............................................133Install RPMs from Remote Systems...................................133RPM Installation Security..............................................134Updating the Kernel.....................................................134More RPM Commands.............................................................136Package Queries..........................................................137Package Signatures.......................................................137File Verification...........................................................138Exercise 4-1:Practice with rpm Commands.....................140

Page 14

RHCSA Red Hat Enterprise Linux 9 Certification Study Guide EX200 (2023) - Page 14 preview image

Loading page ...

xiiRHCSA Red Hat Enterprise Linux 9 Certification Study GuideDependencies and the dnf Command...........................................141An Example of Dependency Hell......................................142Relief from Dependency Hell..........................................143Red Hat Subscription Management..................................144Exercise 4-2:Subscribe a System to Red HatSubscription Management..........................................145Basic dnf Configuration.................................................148Exercise 4-3:Create a dnf Repository from the RHEL 9 DVD...152Third-Party Repositories................................................154Exercise 4-4:Configure Access to the EPEL Repository.......154Basic dnf Commands....................................................155Installation Mode.........................................................155Security and dnf..........................................................157Updates and Security Fixes.............................................157Package Groups and dnf................................................157More dnf Commands....................................................160Module Streams (*).................................................................162Certification Summary..................................................165Two-Minute Drill.........................................................165Q&ASelf Test.....................................................................167Lab Questions.............................................................168Self Test Answers.........................................................168Lab Answers...............................................................1695systemd and the Boot Process..................................173The Boot Process....................................................................175Basic System Configuration............................................175Startup Menus............................................................176Access to Linux Bootloaders...........................................176Bootloaders and GRUB 2..........................................................177GRUB, the GRand Unified Bootloader...............................178Exercise 5-1:Boot into a Different Target........................180Exercise 5-2:Recover the Root Password.........................181Modify the System Bootloader........................................182How to Update GRUB 2.................................................184The GRUB 2 Command Line..........................................185Exercise 5-3:Using the GRUB 2 Command Line...............186An Option for Booting from GRUB 2: Rescue Mode..............187Between GRUB 2 and Login.......................................................189Kernels and the Initial RAM Disk.....................................190The First Process, Targets, and Units.................................191Switch Between Targets.................................................193

Page 15

RHCSA Red Hat Enterprise Linux 9 Certification Study Guide EX200 (2023) - Page 15 preview image

Loading page ...

ContentsxiiiReboot and Shut Down a System Normally.........................193systemd Replaces Upstart and SysVinit..............................194systemd Units.............................................................197Virtual Consoles and Login Screens..................................199Control by Target....................................................................200Functionality by Target..................................................200The Innards of systemd Units..........................................201Service Configuration...................................................203Time Synchronization..............................................................204Time Zone Configuration...............................................205Sync the Time with chronyd...........................................206Certification Summary..................................................207Two-Minute Drill.........................................................207Q&ASelf Test.....................................................................209Lab Questions.............................................................210Self Test Answers.........................................................210Lab Answers...............................................................2116User Administration..............................................215User Account Management.......................................................216Different Kinds of Users.................................................217The Shadow Password Suite............................................218Command-Line Tools...................................................225Exercise 6-1:Add a User with Cockpit Web Console..........228Exercise 6-2:Real and Fake Shells..................................230Modify an Account.......................................................230Administrative Control.............................................................232The Ability to Log In.....................................................232The su Command........................................................233Limit Access to su........................................................234The sg Command.........................................................234Superuser Access with the sudo Command.........................234User and Shell Configuration.....................................................236Home Directories and /etc/skel.......................................236Exercise 6-3:Another Way to Secure a System..................238Shell Configuration Files in User Home Directories..............239Login, Logout, and User Switching...................................239Special Groups.......................................................................240Standard and Red Hat Groups.........................................241Shared Directories.......................................................241Exercise 6-4:Control Group Ownership with the SGID Bit...242Certification Summary..................................................244Two-Minute Drill.........................................................244

Page 16

RHCSA Red Hat Enterprise Linux 9 Certification Study Guide EX200 (2023) - Page 16 preview image

Loading page ...

xivRHCSA Red Hat Enterprise Linux 9 Certification Study GuideQ&ASelf Test.....................................................................245Lab Questions.............................................................246Self Test Answers.........................................................246Lab Answers...............................................................2477Storage and Filesystem Administration.......................253Storage Management and Partitions.............................................255Current System State....................................................255The fdisk Utility...........................................................257The gdisk Utility..........................................................264The parted Utility........................................................265Using parted: Starting, Getting Help, and Quitting...............266Graphical Options........................................................271Exercise 7-1:Work with fdisk and parted.........................272Filesystem Formats..................................................................274Standard Filesystems.....................................................275Journaling Filesystems...................................................276Filesystem Format Commands.........................................276Swap Volumes.............................................................277Filesystem Check Commands..........................................278Exercise 7-2:Format, Check, andMount Different Filesystems.......................................278Basic Linux Filesystems and Directories........................................279Separate Linux Filesystems.............................................279Directories That Can Be Mounted Separately......................281Logical Volume Manager (LVM).................................................282Definitions in LVM.......................................................282Create a Physical Volume...............................................283Create a Volume Group.................................................283Create a Logical Volume................................................283Make Use of a Logical Volume.........................................284More LVM Commands..................................................284Remove a Logical Volume..............................................287Resize Logical Volumes.................................................287Filesystem Management...........................................................288The /etc/fstab File........................................................288Universally Unique Identifiers in /etc/fstab.........................290The mount Command...................................................291More Filesystem Mount Options......................................292Virtual Filesystems.......................................................293Add Your Own Filesystems to /etc/fstab.............................293Removable Media and /etc/fstab......................................293Network Filesystems.....................................................294

Page 17

RHCSA Red Hat Enterprise Linux 9 Certification Study Guide EX200 (2023) - Page 17 preview image

Loading page ...

ContentsxvThe Automounter...................................................................296Mounting via the Automounter.......................................296Exercise 7-3:Configure the Automounter........................300Certification Summary..................................................301Two-Minute Drill.........................................................302Q&ASelf Test.....................................................................303Lab Questions.............................................................304Self Test Answers.........................................................305Lab Answers...............................................................3068Linux Security.....................................................311Basic Firewall Control..............................................................313Standard Ports............................................................314The firewalld Service....................................................315Exercise 8-1:Adjust Firewall Settings.............................320Exercise 8-2:Firewall Configurationwith the Cockpit Web Console.....................................322Securing SSH with Key-Based Authentication................................324SSH Configuration Commands........................................324SSH Client Configuration Files........................................325Basic Encrypted Communication.....................................325Set Up a Private/Public Pair for Key-Based Authentication.....327A Security-Enhanced Linux Primer.............................................329Basic Features of SELinux...............................................329SELinux Status............................................................329SELinux Configuration at the Command Line.....................331Configure Basic SELinux Settings.....................................331Configure Regular Users for SELinux................................332Manage SELinux Boolean Settings....................................334List and Identify SELinux File Contexts..............................334Restore SELinux File Contexts.........................................336Exercise 8-3:Configure a New Directorywith Appropriate SELinux Contexts..............................337SELinux Port Labeling...................................................338Identify SELinux Process Contexts...................................338Diagnose and Address SELinux Policy Violations.................339The GUI SELinux Administration Tool..............................341Certification Summary..................................................344Two-Minute Drill.........................................................345Q&ASelf Test.....................................................................346Lab Questions.............................................................346Self Test Answers.........................................................347Lab Answers...............................................................348

Page 18

RHCSA Red Hat Enterprise Linux 9 Certification Study Guide EX200 (2023) - Page 18 preview image

Loading page ...

xviRHCSA Red Hat Enterprise Linux 9 Certification Study Guide9System Administration Tasks...................................353Resource Management and System Tuning....................................355System Resource Management Commands.........................355System Tuning Profiles..................................................365Archives and Compression........................................................367gzip and bzip2.............................................................367tar............................................................................368star..........................................................................368Running Tasks on a Schedule: cron and at.....................................369The System crontab and Components...............................369Hourly cron Jobs..........................................................372Regular anacron Jobs....................................................372Setting Up cron for Users...............................................373Exercise 9-1:Create a cron Job.....................................374Running a Job with the at System.....................................374Secure cron and at........................................................375Bash Scripts..........................................................................377A “Hello, World” Script.................................................377Bash Variables.............................................................378Bash Control Structures.................................................381Exercise 9-2:Create a Script.........................................386Local Log Files.......................................................................388System Log Configuration File.........................................389Log File Management....................................................390A Variety of Log Files....................................................391Service-Specific Logs....................................................392Exercise 9-3:Learn the Log Files...................................392View systemd Journal Log Entries.....................................392Certification Summary..................................................395Two-Minute Drill.........................................................396Q&ASelf Test.....................................................................397Lab Questions.............................................................399Self Test Answers.........................................................399Lab Answers...............................................................40010An Introduction to Containers..................................405Fundamentals of Container Technology........................................407The Rise of Container Technologies..................................407Virtualization and Containers.........................................409Understanding Container Architecture..............................410Docker and Podman.....................................................411

Page 19

RHCSA Red Hat Enterprise Linux 9 Certification Study Guide EX200 (2023) - Page 19 preview image

Loading page ...

ContentsxviiGetting Started with Containers.................................................412Installing Container Tools..............................................412Running Your First Container..........................................413Rootless and Rootful Containers......................................415Building and Using Container Images...........................................416Image Registries..........................................................416Building Container Images: A Primer................................418Exercise 10-1:Building andRunninga Container Image......420Exercise 10-2:Uploading an Image to Quay.io..................421Managing Containers...............................................................422Podman Commands.....................................................422Running a Container as a SystemD Service.........................430Exercise 10-3:Running a Container as a Service................432Persistent Storage.........................................................434Exercise 10-4:Attaching Persistent Storage to a Container...435Certification Summary..................................................436Two-Minute Drill.........................................................437Q&ASelf Test.....................................................................438Lab Questions.............................................................439Self Test Answers.........................................................440Lab Answers...............................................................442APrepare a System for the Sample Exams......................447Sample Exam System Requirements.............................................447BSolutions to RHCSA Sample Exam 1...........................451RHCSA Sample Exam 1 Discussion.............................................453CSolutions to RHCSA Sample Exam 2...........................459RHCSA Sample Exam 2 Discussion.............................................461DAbout the Online Content.......................................467Single User License Terms and Conditions....................................467Downloadable Book Resources...................................................469Lab Files....................................................................469Appendix A: Prepare a System for the Sample Exams............469Sample Exams.............................................................469Technical Support...................................................................469Index..............................................................471

Page 20

RHCSA Red Hat Enterprise Linux 9 Certification Study Guide EX200 (2023) - Page 20 preview image

Loading page ...

This page intentionally left blank

Page 21

RHCSA Red Hat Enterprise Linux 9 Certification Study Guide EX200 (2023) - Page 21 preview image

Loading page ...

xixACKNOWLEDGMENTSI’d like to thank Ed Tittel, who gave me my first chance to write for publication, as wellas Tim Green, for helping me write what BookAuthority has named the best Red HatLinux book of all time! I’d also like to thank various mentors over the years: Penny Yao,Susan Tacker, Mark Craig, and Carole Jelen for supporting my work. I’d also like to thankAlessandro Orsaria for taking on the work required to update this book. We would nothave the last two editions without him. I’d like to pay tribute to my dog, Katie, who wasthis man’s best friend for 15 years. Most importantly, I’d like to thank my sweet wife,Donna; you are the love of my life.—Mike JangMy profound appreciation extends to Mike Jang and Tim Green, whose confidence inmy abilities enabled me to contribute to the eighth edition of this book. I also wish toextend my gratitude to the editorial team of McGraw Hill, whose stellar efforts have beenindispensable. To Emiliano and Julia, whose unwavering support was my beacon duringthe arduous process of creating this work, I offer my deepest thanks and love. A finalthought goes to Maria, for her constant support in all that I have done.—Alessandro Orsaria

Page 22

RHCSA Red Hat Enterprise Linux 9 Certification Study Guide EX200 (2023) - Page 22 preview image

Loading page ...

This page intentionally left blank

Page 23

RHCSA Red Hat Enterprise Linux 9 Certification Study Guide EX200 (2023) - Page 23 preview image

Loading page ...

xxiPREFACELinux is booming, and Red Hat is leading this growth with the help of skilled Red Hat CertifiedSystems Administrators (RHCSA).Linux, which is free, became popular because it offered companies a cheaper alternativeto the more costly Unix systems. But Linux has more to offer than just cost savings. Thanksto the Linux community, this operating system works well with many kinds of hardware.Today, you can use Linux on everything from laptops and mobile devices to servers andmainframes. This makes Linux a versatile option for many different situations.Linux is also known for its strong security. Because it is open source, any securityproblems can be quickly found and fixed by the community. Linux also has strong rulesabout permissions and access, which makes it tough for harmful software to break in.Regular updates also help keep Linux safe and secure.Linux also provides good support for virtualization, which lets users create and managevirtual machines (VMs) efficiently. With tools like Kernel-based Virtual Machine (KVM)and Xen, Linux allows users to run more than one operating system at the same time ona single machine. This is really useful in server environments, where virtualization makesthings like software deployment and resource management easier.On top of this, Linux is the go-to platform for container technologies like Docker andKubernetes. Containers create isolated environments for applications, making them easierto move and run on different systems. Linux’s built-in features, such as namespaces andcgroups, are the backbone of containerization. These features make it easier to manageresources, isolate processes, and scale up. By bringing together Linux and containerization,software development and deployment have become faster and more efficient.Having discussed the diverse capabilities and advantages of Linux, it’s essential torecognize the challenges that come with mastering it. Red Hat exams, for instance, aretough, and not many first-time test-takers pass the RHCSA exam. But don’t let that scareyou. While passing isn’t guaranteed, this book is designed to help you prepare for andhopefully pass the RHCSA exam. The skills described in this book can also help you inyour job as a Linux administrator. However, this book isn’t a replacement for the Red Hatprep courses, which we’ll talk about soon.To prepare for the RHCSA exam, you should have a laptop or computer with at least8GB of RAM so that you can run a couple of virtual machines. It doesn’t matter whetheryour computer runs Linux, Windows, or macOS; you simply need to be able to createtwo VMs. In this book, we use VMware Workstation Player as our hypervisor, but youcan choose another option like KVM, especially if you’re running Linux on your computer.

Page 24

RHCSA Red Hat Enterprise Linux 9 Certification Study Guide EX200 (2023) - Page 24 preview image

Loading page ...

xxiiRHCSA Red Hat Enterprise Linux 9 Certification Study GuideYou could also use cloud instances for the labs and exercises in this book, although somecloud providers’ version of Red Hat Enterprise Linux might be slightly different from thestandard one. You might also be unable to do some tasks, like installing the operating systemfrom an ISO image. For these reasons, we recommend installing VMware Workstation Player,as explained in Chapter 1, or another hypervisor of your choice.Getting Red Hat Enterprise LinuxRed Hat exams, including the RHCSA, test your proficiency with Red Hat Enterprise Linux.You might believe that you need to buy a subscription to RHEL to meet the exam objectives,such as installing software packages and updates via Red Hat Subscription Management(RHSM). However, Red Hat currently provides a no-cost Developer Subscription forIndividuals if you join the Red Hat Developer program. This subscription includes access toRed Hat Enterprise Linux and a variety of other technologies. Joining the program, which youcan do for free at https://developers.redhat.com/register, is the only requirement. Chapter 1provides detailed instructions on how to join and install Red Hat Enterprise Linux.Alternatively, you can choose to install one of the many derivatives of Red Hat EnterpriseLinux. These derivatives are built from the RHEL source code, which is mostly releasedunder the Linux General Public License (GPL) or other open-source licenses. These licensesgrant anyone the right to construct Red Hat Enterprise Linux from the released Red Hatsource code. However, if you’re comfortable with the terms and conditions of the Red HatDeveloper program, there’s no clear advantage to using a derivative distribution for RHCSAexam preparation.Red Hat also provides several Enterprise Linux subscriptions. While not required forRHCSA exam prep, familiarity with these can be beneficial if you plan to (or already) workwith Red Hat Enterprise Linux systems:RHEL Server provides varying levels of support for three different CPU architectures,with costs based on the number of CPU sockets and supported virtual guests.RHEL Workstation includes varying levels of support ideal for workstation use.RHEL Developer Suite offers download access to RHEL 9 and several additionalsoftware packages, intended solely for development.RHEL add-ons enhance functionality in areas such as high availability, resilient storage,and load balancing, among others.This book was developed using RHEL 9.1 Server. While RHEL’s source code is opensource, access to the binary packages requires a subscription. This can be free of charge ifyou select the Red Hat Developer Subscription for Individuals.

Page 25

RHCSA Red Hat Enterprise Linux 9 Certification Study Guide EX200 (2023) - Page 25 preview image

Loading page ...

PrefacexxiiiEnterprise-level operating systems like RHEL 9 offer the benefit of stability. When anenterprise upgrades to RHEL 9, they can trust that configuration revisions will be a one-time affair, with security updates and bug fixes handled automatically. Red Hat strivesto ensure enterprises won’t need to overhaul their systems for minor releases, such asRHEL 9.1. A necessity to reconfigure for minor updates would escalate costs.Minor releases also should not impact Red Hat exam objectives. While RHEL 9.2 introducesbug fixes, security updates, and new features, it doesn’t alter the defaults of any configurationfiles detailed in this book.We expect future minor releases, such as RHEL 9.3, RHEL 9.4, and beyond, to followthis pattern. Our close monitoring of RHEL releases over the past ten years suggests nosignificant exam objective changes based solely on a minor release. Still, you should routinelycheck the exam objectives listed on the Red Hat website to ensure they align with the contentof this study guide.In This BookChapter 1 of this book is designed to assist you in preparing a study system for the RHCSAexam and offers detailed insight into the exam experience.Except for Chapter 1, every chapter begins by outlining the objectives pertinent to thatchapter’s material. Following this, the topics are dissected and explained. We have chosento present the topics in an order that we believe will be most beneficial to the majority ofcandidates, which doesn’t necessarily follow the sequence of the exam objectives. However,if you are already well-versed with Linux, feel free to skip over certain sections or entirechapters during your initial reading.Toward the end of each chapter, we’ve included a Self Test, a series of questions, along withtheir answers. While Red Hat exams don’t typically involve multiple-choice questions, thesetypes of questions can still be a valuable tool in assessing your understanding and retentionof the chapter material. Furthermore, the short-answer questions format emphasizes thepractical experience necessary for the exam.Following this Self Test is a “Lab Questions” section that directs you to the companionwebsite to access the lab exercises for the chapter. The solutions to the lab exercisesare included in the book, at the end of each chapter. Please see Appendix D, “About theOnline Content.”Remember, Red Hat exams are hands-on. Therefore, practice is key. You shouldrepeatedly exercise your skills until you reach a level of confidence where you can completetasks without the assistance of this book. The Red Hat RHCSA exam is designed to testcandidate qualifications as Linux systems administrators. If you pass the exam, it’s notbecause you’ve memorized a canned set of answers—it’s because you have a set of Linuxadministrative skills and know how to use them under pressure, whether it be during anexam or in a real-world situation.

Page 26

RHCSA Red Hat Enterprise Linux 9 Certification Study Guide EX200 (2023) - Page 26 preview image

Loading page ...

xxivRHCSA Red Hat Enterprise Linux 9 Certification Study GuideWhile this book is organized to serve as an in-depth review for the RHCSA exam forboth experienced Linux and Unix professionals, it is not intended as a substitute for Red Hatcourses—or, more important, real-world experience. Nevertheless, each chapter covers amajor aspect of the exam, with an emphasis on the “why” as well as the “how to” of workingwith and supporting RHEL as a systems administrator or engineer.Conventions and AbbreviationsAlthough logging in to the root user account is a risky practice on production systems, it isthe fastest way to administer RHEL during the exam. The command prompt assumes use ofthat account. When logged in to the root account, you’ll see a command-line prompt similarto the following:[root@server1root]#As the length of this prompt would lead to a number of broken and wrapped code linesthroughout this book, we’ve normally abbreviated the root account prompt as#Be careful. The hash mark (#) is also used as a comment character in Linux scripts andprograms. When logged in as a regular user, you will see a slightly different prompt; for usermichael, it would typically look like the following:[michael@server1michael]$Similarly, we’ve abbreviated this as$There are a number of command lines and blocks of code interspersed throughout thechapters. Commands embedded within regular text, such asls -l, are shown in bold. Userentries and some variables in regular text are also shown in bold.Sometimes commands exceed the available length of a line. Take this example:# virt-install -n outsider1.example.org -r 1024 --diskpath=/var/lib/libvirt/images/outsider1.example.org.img,size=16-l ftp://192.168.122.1/pub/inst -x ks=ftp://192.168.122.1/pub/ks1.cfgUnless this command is carefully formatted, line breaks might appear in unfortunateplaces, such as between the two dashes in front of the--diskswitch. One way to addressthis is with the backslash (\), which “escapes” the meaning of the carriage return thatfollows. (The backslash can also “escape” the meaning of a space, making it easier to work

Page 27

RHCSA Red Hat Enterprise Linux 9 Certification Study Guide EX200 (2023) - Page 27 preview image

Loading page ...

Prefacexxvwith multiple-word filenames.) Therefore, while the following command appears as if it ison four different lines, the backslashes mean that Linux reads it as one single command:#virt-install-noutsider1.example.org -r 1024 --disk \>path=/var/lib/libvirt/images/outsider1.example.org.img,size=16 \>-lftp://192.168.122.1/pub/inst \>-xks=ftp://192.168.122.1/pub/ks1.cfgIn some code snippets, we could not use the backslash character to split the output onmore than one line. In those cases, we used a continuation arrow, as shown next:5 2 * * 6 root /usr/bin/tar --selinux -czf /tmp/etc-backup-\$(/bin/date+\%m\%d).tar.gz /etc > /dev/nullSometimes, you’ll need to actually type in a command or a response to a question at acommand line. In that case, you’ll see an instruction such as “Typey.” Alternatively, somemenus require a keypress; for instance, you may be asked to presspto access a passwordprompt. In that case, the letterpis not added to the screen when you press that key. Inaddition, thea, despite its appearances, is in lowercase. In contrast,Ais the uppercaseversion of that letter.One area where some publishers have trouble is with the double-dash. Some publishingprograms change the double-dash to an em dash (—). But that can be a problem. The double-dash is common in many Linux commands. For example, the following command lists allpackages currently installed on the local system:#rpm--query--allWhen we ran this command on our RHEL 9 systems, it listed over 1000 packages.In contrast, the following command lists all files in all packages on the local system:#rpm--query-allWhen we ran this command on our RHEL 9 system, it listed over 150,000 files, a ratherdifferent result. So pay attention to the dashes, and rest assured that the team who producedthis book took care to make sure that double-dashes are shown as is!Exam Readiness ChecklistAt the end of the Introduction, you will find an Exam Readiness Checklist. This table hasbeen constructed to allow you to cross-reference the official RHCSA exam objectives withthe objectives as they are presented and covered in this book. The checklist also allowsyou to gauge your level of expertise on each objective at the outset of your studies. Thisshould allow you to check your progress and make sure you spend the time you need onmore difficult or unfamiliar sections. The checklist lists all the objectives exactly as RedHat presents them (www.redhat.com/en/services/training/ex200-red-hat-certified-system-administrator-rhcsa-exam?section=objectives) and cross-references the corresponding

Page 28

RHCSA Red Hat Enterprise Linux 9 Certification Study Guide EX200 (2023) - Page 28 preview image

Loading page ...

xxviRHCSA Red Hat Enterprise Linux 9 Certification Study Guidecoverage in this book, including chapter and page references. Additionally, the table featuresa column of blank boxes next to each objective. Readers can check these boxes when theyfeel confident that they are prepared for that specific exam objective.In Every ChapterFor this series, we’ve created a set of chapter components that calls your attention toimportant items, reinforces important points, and provides helpful exam-taking hints.Take a look at what you’ll find in every chapter:Every chapter begins with theCertification Objectives—the skills you need tomaster in order to pass the section on the exam associated with the chapter topic.The Objective headings identify the objectives within the chapter, so you’ll alwaysknow an objective when you see it.Exam Watchnotes call attention to information about, and potential pitfalls in,the exam. These helpful hints are written by authors who have taken the exams andreceived their certification—who better to tell you what to worry about? They knowwhat you’re about to go through!This book’s coverage of theRHCSA exam objectives can be found in theRHCSA Exam Readiness Checklist at the endof this front matter.Practice Exercisesare interspersed throughout the chapters. These are step-by-stepexercises that allow you to get the hands-on experience you need in order to pass theexams. They help you master skills that are likely to be an area of focus on the exam.Don’t just read through the exercises; they are hands-on practice that you shouldbe comfortable completing. Learning by doing is an effective way to increase yourcompetency with a product. Remember, the Red Hat exams are entirely “hands on”;there are no multiple-choice questions on these exams.On the Jobnotes describethe issues that come up most often in real-world settings.They provide a valuable perspective on certification- and product-related topics.They point out common mistakes and address questions that have arisen from on-the-job discussions and experience.Inside the Examsidebars highlight some of the most common and confusing problemsthat students encounter when taking a live exam. Designed to anticipate what the examwill emphasize, they will help ensure you know what you need to know to pass theexam. You can get a leg up on how to respond to those difficult-to-understand labs byfocusing extra attention on these sidebars.

Page 29

RHCSA Red Hat Enterprise Linux 9 Certification Study Guide EX200 (2023) - Page 29 preview image

Loading page ...

PrefacexxviiScenario & Solutionsections lay out potential problems and solutions in a quick-to-read format.TheCertification Summaryis a succinct review of the chapter and a restatement ofsalient skills regarding the exam.TheTwo-Minute Drillat the end of every chapter is a checklist of the main pointsof the chapter. It can be used for last-minute review.TheSelf Testoffers questions designed to help test the practical knowledge associatedwith the certification exams. The answers to these questions, as well as explanationsof the answers, can be found at the end of each chapter. By taking the Self Test aftercompleting each chapter, you’ll reinforce what you’ve learned from that chapter. Thisbook does not include multiple-choice questions because Red Hat does not include anysuch questions on its exams.TheLab Questionsat the end of the Self Test section offer a unique and challengingquestion format that requires the reader to understand multiple chapter concepts toanswer correctly. These questions are more complex and more comprehensive than theother questions because they test your ability to take all the knowledge you have gainedfrom reading the chapter and apply it to complicated, real-world situations. Startingwith Chapter 2, all lab questions are available only from the companion website thataccompanies this book, consistent with the electronic format associated with the RedHat exams. Remember, the Red Hat exams containonlylab-type questions. If you cananswer these questions, you have proven that you know the subject!Additional ResourcesIf you would like to pursue further reading beyond this book, perhaps the best way to do sois with Red Hat documentation. Much of what we’ve learned about RHEL 9 comes from thedocuments available at https://access.redhat.com/documentation/en/red_hat_enterprise_linux/9. For your purposes, the following may be the most important of these guides:Performing a Standard RHEL 9 InstallationAlthough Red Hat exams are givenon preconfigured systems, every Linux administrator should be able to install theoperating system from scratch.Configuring Basic System SettingsThis system administrator guide includesessential skills that you should be able to master in your job.Managing Software with the DNF ToolThis guide could serve as an additionalresource that expands upon the software installation procedures detailed in Chapter 4.Using SELinuxSELinux often poses a challenging topic for many candidates. Thisguide details various strategies that can aid in bolstering your SELinux policy’s security.Configuring and Managing NetworkingDespite a majority of this guide’s chaptersbeing beyond the scope of the RHCSA exam, the initial chapters establish a strongfoundation on network configuration.Q&A

Page 30

RHCSA Red Hat Enterprise Linux 9 Certification Study Guide EX200 (2023) - Page 30 preview image

Loading page ...

xxviiiRHCSA Red Hat Enterprise Linux 9 Certification Study GuideSome PointersOnce you’ve finished reading this book, set aside some time to do a thorough review. Youmight want to return to the book several times and make use of all the methods it offers forreviewing the material:Reread all the Exam Watch notes.Remember that these notes are written by authorswho have taken the exam and passed. They know what you should expect—and whatyou should be on the lookout for.Review all the Scenario & Solution sectionsfor quick problem solving.Retake the Self Tests.Focus on the labs, as there are no multiple-choice questionson the Red Hat exams. We’ve included questions just to test your mastery of thepractical material in each chapter.Complete the exercises.Did you do the exercises when you read through eachchapter? If not, do them! These exercises are designed to cover exam topics, andthere’s no better way to get to know this material than by practicing. Be sure youunderstand why you are performing each step in each exercise. If there is somethingyou are not clear on, reread that section in the chapter.

Page 31

RHCSA Red Hat Enterprise Linux 9 Certification Study Guide EX200 (2023) - Page 31 preview image

Loading page ...

xxixINTRODUCTIONThe Red Hat Exam ChallengeThis section covers the reasons for pursuing industry-recognized certification, explains theimportance of the RHCSA certification, and prepares you for taking the actual examination.It gives you a few pointers on how to prepare, what to expect, and what to do on exam day.This book covers every published exam objective at the time of writing. For the latestobjectives, see www.redhat.com/en/services/certification/rhcsa. Red Hat has also publisheda syllabus for each of its prep courses for these exams, described shortly. While the publishedexam objectives are accurate, the prep course syllabi provide additional information. EachRed Hat prep course provides an excellent grounding in systems administration, networkadministration, security, and more. To that end, this book also includes coverage based on thepublic syllabi of Red Hat courses RH124 and RH134, described later.Nevertheless, this book is not intended to be a substitute for any Red Hat course.Leaping Ahead of the Competition!Red Hat’s RHCSA certification exam is a hands-on exam. As such, it is respectedthroughout the industry as a sign of genuine practical knowledge. If you pass, you willbe head and shoulders above the candidate who has passed only a “standard” multiple-choice certification exam.Red Hat has offered its hands-on exams since 1999. They’ve evolved over the years. Asdetailed in Chapter 1, the RHCSA is a three-hour exam. The requirements are detailed inthe Exam Readiness Checklist later in this Introduction.Why a Hands-On Exam?Most certifications today are based on multiple-choice exams. These types of exams arerelatively inexpensive to set up and easy to proctor. Unfortunately, many people withoutreal-world skills are good at taking multiple-choice exams. In some cases, the answers tothese multiple-choice exams are already available online. This results in problems on thejob with “certified” engineers who have an image as “paper tigers” and do not have anyreal-world skills.
Preview Mode

This document has 527 pages. Sign in to access the full document!

Study Now!

X-Copilot AI
Unlimited Access
Secure Payment
Instant Access
24/7 Support
Document Chat