LFCS practice question 2 of 35

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

Full set: 260 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 instructs the system to transition to a shutdown state and then reboot immediately. The -r flag specifically requests a reboot. Alternatively, SysV init uses a system of runlevels to define the system's state. Runlevel 6 is universally defined as the reboot state. The telinit 6 command (or init 6) directly instructs the init process to change to runlevel 6, thereby triggering a system reboot.

Why Incorrect

B. shutdown -r "rebooting" is a valid command, but it schedules a reboot for one minute in the future, not immediately like now.
D. telinit 0 instructs the system to change to runlevel 0, which is the halt (power-off) state, not the reboot state.
E. The -k flag in shutdown sends a warning message to users but does not actually perform the shutdown or reboot action.

References

1. shutdown(8) manual page. "shutdown arranges for the system to be brought down in a safe way. ... -r Requests that the system be rebooted after it has been brought down."

2. init(8) manual page. "Run-level 6 is used to reboot the system... The role of telinit is to communicate with init and request a change in run-level."

3. Red Hat Enterprise Linux 6 Deployment Guide, "Chapter 5. Booting and Shutting Down", Section 5.4. "To reboot the system from the command line, type the command shutdown -r now... Another way to reboot is to change to runlevel 6."

Scroll to Top