XK0-004 · Question #68
Which of the following commands reboots the system when using SysV init? (Choose TWO correct answers.)
The correct answer is A. shutdown -r now C. telinit 6. In SysV init, a system reboot is triggered either by shutdown with the -r flag or by switching to runlevel 6 via telinit.
Question
Which of the following commands reboots the system when using SysV init? (Choose TWO correct answers.)
Options
- Ashutdown -r now
- Bshutdown -r "rebooting"
- Ctelinit 6
- Dtelinit 0
- Eshutdown -k now "rebooting"
How the community answered
(33 responses)- A94% (31)
- B3% (1)
- D3% (1)
Why each option
In SysV init, a system reboot is triggered either by shutdown with the -r flag or by switching to runlevel 6 via telinit.
shutdown -r now sends a reboot signal immediately (time argument 'now' means no delay); the -r flag instructs the system to restart rather than halt after bringing services down cleanly.
shutdown requires a time argument before the optional message; 'shutdown -r "rebooting"' is invalid syntax because the quoted string is interpreted as the time parameter, which fails validation and does not execute a reboot.
In SysV init, runlevel 6 is defined as the reboot runlevel; telinit 6 instructs init to transition to that runlevel, causing the system to stop all services and restart.
telinit 0 transitions the system to runlevel 0, which is the halt runlevel that powers off or stops the system, not the reboot runlevel.
shutdown -k sends a wall warning message to logged-in users but explicitly does NOT perform any actual shutdown or reboot action; the -k flag stands for 'kick' and is used only for testing or warning purposes.
Concept tested: SysV init runlevels and shutdown command flags
Source: https://man7.org/linux/man-pages/man8/shutdown.8.html
Topics
Community Discussion
No community discussion yet for this question.