What command displays the current runlevel of a linux system - CompTIA Linux + XK0-005

Question

What command displays the current runlevel of a Linux system?
 

Answers
  1. correct
Explanation

Correct Answer: d. runlevel

The runlevel command displays the current and previous runlevels of a Linux system. Runlevels define the state of the machine, such as whether it's in single-user mode, multi-user mode, or graphical mode. 

When you run the runlevel command, it returns two characters: the previous runlevel and the current one. This command is particularly useful for administrators managing system states or troubleshooting boot-level configurations.

Why the other options are incorrect :

  • a. uptime: This command shows how long the system has been running, including the current time, number of users, and system load averages. It does not display information about runlevels or system states, so it's unrelated to the question's goal.
  • b. level: This is not a valid Linux command to retrieve runlevel information. Typing level would result in a “command not found” error unless it’s an alias or script defined by the user, which is not standard.
  • c. who: The who command shows who is logged into the system and their session details. It may include system boot time but does not show the current runlevel directly.
     

Related Courses

Discover a range of courses designed to provide you with the knowledge and skills needed to excel in your chosen field.

a prepsaret exam featured image
CompTIA Prep

220-1201 - CompTIA A+ Exam Core 1

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

220-1202 - CompTIA A+ Exam Core 2

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA SecurityX CAS-005

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Cloud Essentials+ CLO-002

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Network+ N10-009

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Security+ SY0-701

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Data + DA0-001

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Pentest+

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA CySA+ CSO-003

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA DataSys+ DS0-001

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Tech+ FC0-U71

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Cloud+ CV0-004

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Server+ SK0-005

Start Course Prep

Easy way to pass your test within a week with prepsaret

You don’t need one month to study and pass your test.
With Prepsaret, it takes you a few days to grasp all the concepts needed to pass your exams

View Courses Offered