Bookmark this page

Guided Exercise: Identify the Status of systemd Units

In this lab, you will identify installed and running services on the system.

Outcomes

A list of active and enabled services on the system.

Reset your serverX system.

  1. List all service units on the system.

    [student@serverX ~]$ systemctl list-units --type=service
  2. List all socket units, active and inactive, on the system.

    [student@serverX ~]$ systemctl list-units --type=socket --all
  3. Explore the status of the chronyd service. This service is used for network time synchronization (NTP).

    1. Display the status of the chronyd service. Note the process ID of any active daemons.

      [student@serverX ~]$ systemctl status chronyd
    2. Confirm that the listed daemons are running.

      [student@serverX ~]$ ps -p PID
  4. Explore the status of the sshd service. This service is used for secure encrypted communication between systems.

    1. Determine if the sshd service is enabled to start at system boot.

      [student@serverX ~]$ systemctl is-enabled sshd
    2. Determine if the sshd service is active without displaying all of the status information.

      [student@serverX ~]$ systemctl is-active sshd
    3. Display the status of the sshd service.

      [student@serverX ~]$ systemctl status sshd
  5. List the enabled or disabled states of all service units.

    [student@serverX ~]$ systemctl list-unit-files --type=service
Revision: rh124-7-1b00421