3.3 Runlevels Flashcards
Which file affects the default runlevels?
The /etc/inittab file affects the default runlevels.
Why would you set the runlevel to 1?
Runlevel 1 is single-user mode, which is typically used for maintenance or troubleshooting tasks as it limits the daemons started and only allows a single user to login.
What is the difference in functionality between a runlevel 1 and runlevel 3?
- Runlevel 1 is single user mode, in which the system runs only enough daemons to allow a single user to log in. It is typically used for maintenance.
- Runlevel 3 is extended multi-user mode, in which the system provides multi-user mode support in addition to all network services, including Network File System. It is typically used for normal operations.
Which runlevel reboots the system, and which runlevel shuts the system down?
- Runlevel 0 shuts the system down.
- Runlevel 6 reboots the system
What commands can be used to change the runlevel?
The init and telinit commands can be used to change the runlevel.
How can you enter kernel options during the system boot up?
Using the ‘a’ key (to insert new kernel options) or the ‘e’ key (to edit existing kernel options) while in the GRUB boot menu.
How can you identify the current and previous runlevels?
The runlevel command identifies the previous and current runlevels, respectively.
What is a runlevel?
A runlevel is collection of services that defines a specific system state.
Describe the runlevel state 0.
This is the halt state. In runlevel 0, the system has no daemons in memory and is ready to be turned off.
Describe the runlevel state 1.
This is single user mode. In single user mode, the system uses only enough daemons to allow a single user to log in, and is often used for maintenance tasks. The user is automatically logged in as the root user.
Describe the runlevel state 2.
This is multi-user mode. In multi-user mode, the system allows multiple users to log in. It also provides networking services with the exception of the Network File System.
Describe the runlevel state 3.
This is extended multi-user mode. In extended multi-user mode, the system provides multi-user mode support in addition to all network services, including Network File System.
Describe the runlevel state 4.
This runlevel is undefined, but can be defined if necessary.
Describe the runlevel state 5.
This is graphical mode. In graphical mode, the system provides the same capabilities as in extended user mode. However, the system also supports graphical log ins.
Describe the runlevel state 6.
This is the reboot runlevel. In this runlevel, the system re-starts itself.
What does the init daemon do and how does it use /etc/inittab?
During the boot process, the init (initialize) daemon loads all the other daemons that control the system. Init uses the /etc/inittab file to determine the default runlevel, and then starts the appropriate daemons for that runlevel.