LPIC-1 Administrative Tasks Practice Question
Which TWO commands can be used to display the current runlevel of a SysV init system?
⚠ Common exam trap
It's easy for candidates to confuse commands that change runlevels (like `init` or `telinit`) with those that display them, or mistakenly apply systemd commands like `systemctl get-default` to SysV init systems.
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
✓
who -r
Option B (who -r) is correct because the who command with the -r flag reads the /var/run/utmp file and prints the current runlevel along with the time it was last changed, making it a valid way to display the runlevel on a SysV init system. Option D (runlevel) is correct because the runlevel command reads /var/run/utmp and outputs the previous and current runlevel (e.g., 'N 3'), directly reporting the system's current runlevel. Option A (init 3) is incorrect because init 3 changes the runlevel to 3 rather than displaying the current one. Option C (telinit) is incorrect because telinit is used to send control commands to init (such as changing runlevels), not to query the current runlevel. Option E (systemctl get-default) is incorrect because it is a systemd command that shows the default target, not the current runlevel of a SysV init system.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
init 3
Why it's wrong here
init 3 changes the runlevel by switching to multi-user text mode; it does not report the current one. It is tempting because init manipulates runlevels directly, and would be the correct choice when the task is to change runlevel rather than display it.
- ✓
who -r
Why this is correct
The who command with the -r flag queries the utmp database and prints the current runlevel together with the last boot time, reading the same SysV init state that runlevel reports. This directly satisfies the requirement to display the runlevel on a SysV init system.
- ✗
telinit
Why it's wrong here
telinit changes the runlevel by signalling init; it does not report the current one. It is the correct command for switching a SysV system into a different runlevel, such as single-user mode, so it belongs in a question about transitioning states rather than displaying the active runlevel.
- ✓
runlevel
Why this is correct
The `runlevel` command reads `/var/run/utmp` and prints the previous and current runlevel, satisfying the requirement to display the current runlevel on a SysV init system. It reports both values directly, unlike `who -r`, which formats the same utmp data differently.
- ✗
systemctl get-default
Why it's wrong here
systemctl get-default reports the default systemd target, not the running SysV runlevel, and systemd systems do not track runlevels at all. It is the right tool for identifying which target boots by default on a systemd host, which is a different question from querying a SysV init runlevel.
Go deeper
Related to this question
About these practice questions
This LPIC-1 question is part of Courseiva's 402-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 →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This LPIC-1 practice question is part of Courseiva's free LPI 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 LPIC-1 exam.