LFCS · Question #688
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 systems, both shutdown -r now and telinit 6 are valid commands to initiate a system reboot.
Question
Options
- Ashutdown -r now
- Bshutdown -r "rebooting"
- Ctelinit 6
- Dtelinit 0
- Eshutdown -k now "rebooting"
How the community answered
(59 responses)- A92% (54)
- B5% (3)
- D2% (1)
- E2% (1)
Why each option
In SysV init systems, both `shutdown -r now` and `telinit 6` are valid commands to initiate a system reboot.
The `shutdown` command with the `-r` option initiates a reboot, and `now` specifies that the reboot should happen immediately after sending warnings and gracefully stopping services.
`shutdown -r "rebooting"` is syntactically incorrect; the `shutdown` command requires a time argument (e.g., `now` or `+minutes`) after `-r` to specify when the reboot should occur, not a message in its place.
`telinit 6` instructs the init process to change the system's run level to 6, which is the standard run level designated for system reboot in SysV init.
`telinit 0` changes the run level to 0, which is designated for system halt or power-off, not for rebooting the system.
`shutdown -k now "rebooting"` only sends a warning message to logged-in users; the `-k` option means 'don't actually shut down', so it would not reboot the system.
Concept tested: SysV init reboot commands
Topics
Community Discussion
No community discussion yet for this question.