What command is used to change the default runlevel in a SysV init system?

Prepare for the LPIC-2 Certification Test with our study tools, including flashcards and multiple choice questions with hints and explanations. Get ready to pass your exam!

Changing the default runlevel in a SysV init system is accomplished with the command that allows the system to transition to a specified runlevel. The init command is specifically designed to change the runlevel in a SysV-style init environment.

When you use the init command followed by a runlevel number, the system will switch to that runlevel, effectively acting upon the defined scripts in the appropriate runlevel directories (typically located in /etc/rc.d or /etc/init.d). This command is fundamental in managing how a Linux system starts up and what services are made available at each runlevel.

Moreover, in a SysV init context, runlevels define various states of the system, such as single-user mode, multi-user modes, or graphical interface states. By changing the default runlevel using the init command, administrators control system behavior during boot and shutdown, allowing them to dictate which services must start or stop in relation to the operational needs of the system.

The other options do not apply to SysV init systems: for example, systemctl pertains to systemd, not SysV, while the 'runlevel' command doesn't change default runlevels but instead outputs the current runlevel.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy