Courseiva

LFCS Operation of Running Systems Practice Question

To view the system's default runlevel (target) at boot, which command is used on a systemd-based system?

⚠ Common exam trap

The trap here is that candidates familiar with SysVinit may instinctively choose `runlevel` or `cat /etc/inittab`, not realizing that systemd replaces these with `systemctl` commands and uses target units instead of runlevels.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

systemctl get-default

On systemd-based systems, the default target (analogous to runlevel) is managed by systemctl. The command `systemctl get-default` queries the symlink at `/etc/systemd/system/default.target` to display which target is set to boot by default, making it the correct way to view the system's default boot target.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    systemd-analyze

    Why it's wrong here

    systemd-analyze reports boot timing and unit dependency information, not the default target; that value comes from systemctl get-default. It is tempting because it inspects systemd state, and would be correct for diagnosing slow boots or verifying unit ordering.

  • ✓

    systemctl get-default

    Why this is correct

    `systemctl get-default` queries systemd's default target directly, reading the symlink at `/etc/systemd/system/default.target`. This satisfies the stem's requirement to view the boot target on a systemd-based system, returning values such as `graphical.target` or `multi-user.target` without altering configuration.

  • ✗

    runlevel

    Why it's wrong here

    runlevel reports the previous and current SysV runlevels from utmp, not the default target configured for boot; on systemd it typically prints 'N 5' regardless of the default. It is tempting because it names runlevels directly, and would be correct on a SysV init system.

  • ✗

    cat /etc/inittab

    Why it's wrong here

    On systemd systems the boot default is stored in /etc/systemd/system/default.target (a symlink), so /etc/inittab is absent and returns nothing useful. It is tempting because SysV-init systems genuinely used /etc/inittab to define the default runlevel, making it the right file only on legacy non-systemd hosts.

About these practice questions

This LFCS question is part of Courseiva's 406-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This LFCS practice question is part of Courseiva's free Linux Foundation certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LFCS exam.