XK0-005 · 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. To reboot a system using SysV init, both the shutdown -r now command and switching to runlevel 6 with telinit 6 are valid methods.
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
(42 responses)- A93% (39)
- B2% (1)
- D5% (2)
Why each option
To reboot a system using SysV init, both the `shutdown -r now` command and switching to runlevel 6 with `telinit 6` are valid methods.
The `shutdown -r now` command instructs the system to initiate a reboot immediately.
The command `shutdown -r "rebooting"` is syntactically incomplete as it lacks a time argument (e.g., `now` or `+minutes`) to actually schedule the reboot.
In SysV init, `telinit 6` changes the system's runlevel to 6, which is the standard runlevel defined for rebooting the system.
`telinit 0` changes the system's runlevel to 0, which halts or powers off the system, rather than rebooting it.
`shutdown -k now "rebooting"` only sends a warning message to logged-in users and does not actually perform a system reboot.
Concept tested: SysV init system shutdown and reboot
Source: https://man7.org/linux/man-pages/man8/shutdown.8.html
Topics
Community Discussion
No community discussion yet for this question.