Linux Foundation Certified System Administrator Exam: Rebooting System with SysV Init

Rebooting System with SysV Init

Question

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

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E.

AC

SysV init is the traditional initialization system used in many Unix-based systems, including Linux. It is responsible for starting and stopping system services during the boot process and in runlevels.

To reboot a system using SysV init, there are several commands available. Let's examine each of the options provided in the question:

A. shutdown -r now: This command will immediately reboot the system. The -r option indicates a reboot, and the now option specifies that it should happen immediately. This is one of the most common ways to reboot a system using SysV init.

B. shutdown -r "rebooting": This command is similar to the previous one, except it provides a message to all logged-in users. The message "rebooting" will be displayed on their screens before the system is rebooted.

C. telinit 6: The telinit command is used to change the system runlevel. In SysV init, runlevels are numbered from 0 to 6, with each level having a specific set of services that are started or stopped. Runlevel 6 is typically used to reboot the system. This command will change the runlevel to 6, which will initiate a reboot.

D. telinit 0: This command changes the system runlevel to 0, which is the shutdown runlevel. In other words, it will power off the system rather than rebooting it. This is not the correct command to use if you want to reboot the system.

E. shutdown -k now "rebooting": This command will not actually reboot the system. Instead, it will send a warning message to all logged-in users indicating that the system is going to be shut down. The -k option indicates that it is a warning message only, and the now option specifies that it should happen immediately. The message "rebooting" will be displayed on their screens, but the system will not be rebooted.

Therefore, the correct commands to reboot the system when using SysV init are A (shutdown -r now) and C (telinit 6).