LX0-103 · Question #91
Which of the following commands brings a system running SysV init into a state in which it is safe to perform maintenance tasks? (Choose TWO correct answers.)
The correct answer is C. init 1 D. telinit 1. Under SysV init, switching to runlevel 1 (single-user mode) is the standard way to enter a safe maintenance state, and both init and telinit can trigger this transition.
Question
Which of the following commands brings a system running SysV init into a state in which it is safe to perform maintenance tasks? (Choose TWO correct answers.)
Options
- Ashutdown -R 1 now
- Bshutdown -single now
- Cinit 1
- Dtelinit 1
- Erunlevel 1
How the community answered
(28 responses)- B4% (1)
- C89% (25)
- E7% (2)
Why each option
Under SysV init, switching to runlevel 1 (single-user mode) is the standard way to enter a safe maintenance state, and both init and telinit can trigger this transition.
The shutdown command does not accept -R as a flag for specifying a runlevel; -r means reboot, so shutdown -R 1 now is invalid syntax and would not bring the system to single-user mode.
shutdown does not support a -single flag; the correct shutdown syntax for single-user mode would be shutdown -h or using init/telinit directly.
The init command, when called directly with a runlevel argument like init 1, signals the init process (PID 1) to switch to runlevel 1 (single-user mode), stopping non-essential services for safe maintenance.
telinit is a symlink or wrapper to init designed specifically for sending runlevel-change requests to the running init daemon; telinit 1 is the canonical command for switching to single-user maintenance mode.
The runlevel command is a query-only tool that displays the current and previous runlevels; it cannot be used to change the system's runlevel.
Concept tested: SysV init runlevel change to single-user maintenance mode
Source: https://man7.org/linux/man-pages/man8/telinit.8.html
Topics
Community Discussion
No community discussion yet for this question.