← All RHCSA Flashcard Decks

RHCSA Systemd and Service Management Flashcards

7 cards from real RHCSA practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 7 RHCSA Systemd and Service Management flashcards as text
  1. Which directive in a unit file's `[Service]` section sets environment variables for the process?

    Answer: Environment=

    `Environment=` sets key=value environment variables directly in the unit file's `[Service]` section.

  2. How do you make journald persist logs across reboots on a RHEL system where it is not yet doing so?

    Answer: Create /var/log/journal/ directory and restart systemd-journald

    Creating `/var/log/journal/` causes journald to automatically switch to persistent storage on restart.

  3. A unit file has `ConditionPathExists=/etc/myapp.conf`. What happens if that file does not exist when the unit is started?

    Answer: The unit is skipped silently as if it succeeded

    When a `Condition*=` check fails, systemd skips the unit without error — it reports as 'success' but does nothing.

  4. Which systemctl subcommand shows all currently loaded and active socket units?

    Answer: systemctl list-units --type=socket

    `systemctl list-units --type=socket` filters the active unit list to show only socket units.

  5. What is the correct way to view the full content of a unit file including overrides using systemctl?

    Answer: systemctl cat httpd.service

    `systemctl cat` prints the full unit file content including all applicable drop-in override files.

  6. A service has `After=postgresql.service` but NOT `Requires=postgresql.service`. What is the practical effect?

    Answer: The service starts after PostgreSQL if PostgreSQL is being started, but starts regardless otherwise

    `After=` only controls ordering; without `Requires=` or `Wants=`, there is no dependency — only sequencing if both happen to activate.

  7. Which command sets `graphical.target` as the default boot target?

    Answer: systemctl set-default graphical.target

    `systemctl set-default graphical.target` updates the `default.target` symlink to point to `graphical.target`.