This is part of the independent and unofficial RHCSA Exam Study Guide series providing free π€ resources to prepare for the exam.
This post covers the objectives under the section:
βOPERATE RUNNING SYSTEMSβ
It contains two main parts:
- Resources: with links to learn and practice for each objective.
- Cheatsheet: containing some examples of commands and actions performed in each objective (when applied).
π Resources:
BOOT, REBOOT, AND SHUT DOWN A SYSTEM NORMALLY
π RHCSA v8 Practice Session: Boot, reboot, and shut down a system normally
π Chapter 16. Shutting down, suspending, and hibernating the system
π How Boot, Reboot, and Shut Down the System Normally on CentOS 7 / RHEL 7
BOOT SYSTEMS INTO DIFFERENT TARGETS MANUALLY
INTERRUPT THE BOOT PROCESS IN ORDER TO GAIN ACCESS TO A SYSTEM
IDENTIFY CPU/MEMORY INTENSIVE PROCESSES AND KILL PROCESSES
π RHCSA v8 Practice Session: Identify CPU/memory intensive processes and kill processes
π How To Use ps, kill, and nice to Manage Processes in Linux
π Linux Command Basics: 7 commands for process management
ADJUST PROCESS SCHEDULING
MANAGE TUNING PROFILES
π 2. Getting started with Tuned (skip items: 2.4, 2.8 and 2.9)
LOCATE AND INTERPRET SYSTEM LOG FILES AND JOURNALS
π RHCSA v8 Practice Session: Locate and interpret system log files and journals
π Beginners Guide to CentOS/RHEL logging (systemd-journald and rsyslog) architecture)
π Overview of Syslog Priorities, rsyslog rules, log rotation and basic troubleshooting using syslog
π How to use journalctl to view log messages in journal for system troubleshooting
PRESERVE SYSTEM JOURNALS
START, STOP, AND CHECK THE STATUS OF NETWORK SERVICES
π RHCSA RHEL 8 - Start, stop, and check the status of network services
π Chapter 14. Managing system services with systemctl (skip items 14.2. and 14.5)
SECURELY TRANSFER FILES BETWEEN SYSTEMS
π RHCSA v8 Practice Session: Securely transfer files between systems
π How to securely copy files between Linux hosts using SCP and SFTP
π Cheatsheet:
BOOT, REBOOT, AND SHUT DOWN A SYSTEM NORMALLY
systemctl rebootβ‘ shut down and reboot the system.systemctl haltβ‘ shut down and halt the system (stops CPU but keeps it powered).systemctl poweroffβ‘ shut down and poweroff the system (stops CPU and turns off the power).
BOOT SYSTEMS INTO DIFFERENT TARGETS MANUALLY
systemctl get-defaultβ‘ get the default boot target.systemctl set-default multi-userβ‘ set the default boot target.systemctl --type target --allβ‘ list all target units (loaded or not).Interrupt boot process to temporarily boot from another target (i.e.:
multi.user.target), without changing the default target:- append
systemd.unit=multi-user.targetβ‘ to the end of the boot cmd, when editing the grub menu entry, and start it with Ctrl+x.
- append
INTERRUPT THE BOOT PROCESS IN ORDER TO GAIN ACCESS TO A SYSTEM
Reset root pwd in 7 steps:
append
rd.breakβ‘ to the end of the boot cmd, when editing the grub menu entry, and start it with Ctrl+x.chroot /sysrootβ‘ make the mounted (read-only) root file system (/sysroot) appear as mounted on/.mount -o remount,rw /β‘ remount root file system in read/write mode for thepasswdcmd to be able to modify the shadow file with a new pwd.passwdβ‘ change password for the root user.touch .autorelabelβ‘ create.autorelabelfile to instruct the OS to run SELinux relabeling on all files on the next reboot (including theshadowthat was updated).exitβ‘ thechrootshell.rebootβ‘ the system.Extra Step:
mandbβ‘ after restart, rebuild manual pages db.
Install most recent kernel, without removing/updating previous kernel (7 files):
linux-firmwarekernelkernel-corekernel-headerskernel-moduleskernel-toolskernel-tools-libs
dnf list installed kernel*β‘ list installed kernels.cat /boot/grub2/grubenvβ‘ check if new installed kernel is default boot option.
IDENTIFY CPU/MEMORY INTENSIVE PROCESSES AND KILL PROCESSES
tar -czf home.tar.gz . &β‘ starttaras background process in the current shell.jobsβ‘ list backgrund processes in the current shell.ps -auxβ‘ list every process in the system.ps -eo pid,nice,cmd | grep topβ‘ showpidandnicefor thetopβ‘ running process.kill -sigstop 3251β‘ send stop signal to process.
ADJUST PROCESS SCHEDULING
nice -n +8 topβ‘ runtopcmd with a lower priority (by 8).renice -n -10 -p 3261β‘ increase the priority of the3261running proccess to-10.crontab -eβ‘ edit usercrontab.23 8 * * * echo "Hello World" > /dev/pts/0β‘ in acrontabfile, this entry will make the terminal/dev/pts/0print the message everyday at 8:23.cat /var/log/cronβ‘ cron execution logs.
MANAGE TUNING PROFILES
tuned-adm profile,tuned-adm listβ‘ list all available system tuning profiles.tuned-adm activeβ‘ show current system tuning profile.tuned-adm recommendβ‘ list recommended system tuning profile.tuned-adm profile balancedβ‘ set system profile tobalanced.
LOCATE AND INTERPRET SYSTEM LOG FILES AND JOURNALS
cat /etc/rsyslog.confβ‘ see directories defined to save the log files generated byrsyslog.tail -f /var/log/secureβ‘ live view of thesecurelog file.tail /var/log/audit/audit.logβ‘ view SELinux related logs.journalctl --since 10:00β‘ viewjournallogs from 10:00 until now.journalctl --unit sshd.service -o verboseβ‘ viewjournallogs related tosshd.servicedisplaying additional parameters.journalctl --priority critβ‘ view critial priority logs.logger "$LOGNAME is delivering this message at $(date)"β‘ write custom log message to/var/log/messages.
PRESERVE SYSTEM JOURNALS
Preserve system journals:
mkdir -p /var/log/journalsystemctl restart systemd-journald
journalctl -b -1β‘ view log messages from previous boot.itemβ‘ description.
START, STOP, AND CHECK THE STATUS OF NETWORK SERVICES
systemctl status sshd.serviceβ‘ verify ifsshdgeneral status.systemctl enable sshd.serviceβ‘ makesshdstart at system startup.systemctl disable sshd.serviceβ‘ makesshddo not start at system startup.systemctl start sshd.serviceβ‘ makesshdstart temporarily (this system do not persist reboots).systemctl disable sshd.serviceβ‘ makesshdstop temporarily (this setting do not persist reboots).
SECURELY TRANSFER FILES BETWEEN SYSTEMS
scp srv2:/etc/chrony.conf /tmpβ‘ get file fromsrv2.scp -r /etc/sysconfig srv2:/tmpβ‘ transfer entire directory tosrv2.scp -p file1.txt srv2:/tmpβ‘ transfer file tosrv2/tmpdirectory preserving file attributes (permissions, etc).
Next:
(RHCSA) Configure Local Storage
β¦or back to Red Hat Certified System Administrator (RHCSA) Exam Study Guide
Useful links & references:
Enable Sysadmin (a blog from Red Hat)
Footnotes:
- Follow me on Twitter to get more posts like this and other quick tips in your feed.
- If you have any doubts or tips about this article, Iβd appreciate knowing and discussing it via email.
- Do you have any other Linux tips? Would you like to publish that in this blog? Please send an email to all drops.
- As English is not my native language, I apologize for the errors. Corrections are welcome.
- Contact: contact [@] alldrops [.] info.




