Show Menu
Cheatography

RHCSA Chapter Commands Cheat Sheet (DRAFT) by

RHCSA Chapter Commands

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Defini­tions

Systemd
System and service manager
Units
Resources managed by systemd
Mount
A mount unit specifies how a file system can be mounted on a specific directory.
Socket
A socket creates a method for applic­ations to commun­icate with one another. This can be defined as a file or a port.
| ->L­ist­enS­tream
TCP Port used by service listed in service file.
| ->L­ist­enD­atagram
UDP Port used by service listed in service file.
Target Unit
A simple definition of a target unit is “a group of units.” Formerly comparable to run levels in previous iterations of RHEL.
Want
A symbolic link is known as a want, as it defines what the target wants to start when it is processed.

Unit File Location & Precedence

/run/s­yst­emd­/system
Contains unit files that have automa­tically been generated.
/etc/s­yst­emd­/system
Contains custom unit files. It may also contain include files that have been written by an admini­strator or generated by the systemctl edit command.
/usr/l­ib/­sys­tem­d/s­ystem
Contains default unit files that have been installed from RPM packages. You should never edit these files directly.

Systemd Commands

systemctl -t help
display a list of available units
systemctl list-d­epe­nde­ncies [service]
display an overview of any existing depend­encies.
systemctl list-d­epe­nde­ncies [service] --reverse
find out which units are dependents of this unit.
systemctl [enabl­e/d­isable]
ensure that a unit is automa­tically starte­d/d­isable while booting.
systemctl show
To figure out which options are available for a specific unit.
systemctl show [service]
Shows all Systemd options that can be configured in the [servi­ce].se­rvice unit, including their current default values.
systemctl edit
creates a subdir­ectory in /etc/s­yst­emd­/system for the service that you are editing with an overri­de.conf file that will overwrite any existing settings in the service file in /usr/l­ib/­sys­tem­d/s­ystem

Tips

Systemd Text Editior
swap the default editor in /root/.ba­sh_­profile file to include the following line: export SYSTEM­D_E­DIT­OR=­"­/bi­n/v­im"