101-500 practice question 4 of 30

Which of the following commands reboots the system when using SysV init? (Choose TWO correct answers.)

Full set: 246 questions
Answer options
A: shutdown -r now Correct answer
B: shutdown -r "rebooting"
C: telinit 6 Correct answer
D: telinit 0
E: shutdown -k now "rebooting"
Correct Answer:
A. shutdown -r now; C. telinit 6
Explanation

On a system using SysV init, there are two primary commands to initiate a reboot. The shutdown -r now command is the standard, safe method. The -r flag signals a reboot, and now specifies that it should happen immediately. This command ensures filesystems are synced and services are stopped gracefully. Alternatively, SysV init uses runlevels to define system states. Runlevel 6 is universally defined as the reboot state. The telinit 6 command instructs the init process to transition to runlevel 6, thereby triggering the system's reboot scripts.

Why Incorrect

B. This command is syntactically incorrect for an immediate reboot; it is missing the required time argument like now.
D. telinit 0 instructs the system to transition to runlevel 0, which is the halt (power-off) state, not reboot.
E. The -k flag for shutdown sends a warning message to logged-in users but does not actually perform the reboot.

References

1. shutdown(8) man page. It explicitly states: "shutdown arranges for the system to be brought down in a safe way... The -r flag means to reboot after shutting down."

2. init(8) man page. In the description of runlevels, it consistently defines runlevel 6 as the state to "reboot the system". The telinit command is used to signal init to change to a new runlevel.

3. Debian Reference, Version 2.73, Chapter 2. "Debian fundamentals", Section 2.4.4. "Booting the system". It lists the standard runlevels, specifying "6: stop and reboot the system."

Scroll to Top