Courseiva
Service ConfigurationmediumMultiple SelectObjective-mapped

LFCS Service Configuration Practice Question

Which two commands produce output that includes the current runlevel or target? (Choose two.)

⚠ Common exam trap

The trap here is that candidates often pick `systemctl get-default` (option E) thinking it shows the current target, but it only shows the default target for the next boot, not the currently active target, which is a common confusion between persistent default and runtime state.

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

runlevel

The `runlevel` command displays the previous and current runlevel from the `/var/run/utmp` file, making it a direct way to see the current runlevel. The `who -r` command reads the same utmp file and prints the current runlevel along with the time of the last runlevel change, so both commands produce output that includes the current runlevel or 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.

  • systemctl list-units --type=target

    Why it's wrong here

    This lists all targets, not the current one.

  • systemctl show-environment

    Why it's wrong here

    Shows environment variables, not runlevel.

  • runlevel

    Why this is correct

    Displays previous and current runlevel.

  • who -r

    Why this is correct

    Displays current runlevel.

  • systemctl get-default

    Why it's wrong here

    This shows the default target, not the current runlevel.

About these practice questions

Courseiva writes every LFCS question from scratch — 507 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.