XK0-005 · Question #53
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. To transition a SysV init system into a safe maintenance state, which corresponds to runlevel 1 (single-user mode), both the init 1 and telinit 1 commands can be used.
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
(49 responses)- A4% (2)
- B2% (1)
- C94% (46)
Why each option
To transition a SysV init system into a safe maintenance state, which corresponds to runlevel 1 (single-user mode), both the `init 1` and `telinit 1` commands can be used.
`shutdown -R 1 now` is an incorrect syntax; `shutdown -r now` initiates a reboot, but `shutdown -R 1` is not a valid way to enter runlevel 1 for maintenance.
`shutdown -single now` is not a standard or valid command for entering single-user mode in SysV init systems.
The `init` command, followed by a runlevel number, is used in SysV init systems to change the current runlevel; `init 1` specifically switches the system to runlevel 1, which is typically single-user mode, ideal for maintenance.
The `telinit` command is generally a symbolic link to `init` and serves the same purpose of changing the system's runlevel; `telinit 1` will also switch the system to runlevel 1 (single-user mode) for maintenance.
The `runlevel` command displays the current and previous runlevels, but it does not change the system's runlevel.
Concept tested: SysV init runlevels for maintenance
Source: https://man7.org/linux/man-pages/man8/init.8.html
Topics
Community Discussion
No community discussion yet for this question.