Runlevels allow the system administrator to automate different system
configurations. On a laptop, for example, you may have one runlevel setup
to configure the system when it is in a docking station and a different runlevel
setup to configure the system when it is mobile. On floppix, 4 runlevels
are setup:
runlevel 0 is for system shutdown
runlevel 1 is single user (used when the system administrator needs to perform
system maintenance that cannot be done when other users are logged on)
runlevel 2 is the normal multi-user configuration (note that other Linux
distributions define runlevels 2-5 differently; check the documentation for
your own distribution)
runlevel 6 is for rebooting
The command to determine the current runlevel is: runlevel
The output will be 2 characters - the previous runlevel (N if there
was no previous runlevel) and the current runlevel.
The command to change runlevels is: telinit x
where x is the new runlevel.
Exercises:
Determine the current runlevel.
Change to runlevel 1.
Shutdown floppix by changing to runlevel 0.
Restart floppix in single user mode ( loadlin linux single )
Now change to multiuser mode which is runlevel 2.
Questions & Answers:
What runlevel is configured for halting the system?
Answer: Runlevel 0.
What is single-user mode?
Answer: In single-user mode, only the superuser can login. This
allows the superuser to perform system maintenance.
What command is used to change to runlevel 1?
Answer: telinit 1
Can you choose a runlevel when you start the system?
Answer: Yes. On floppix, you can choose to startup in runlevel
1 using the command: loadlin linux single or loadlin linux 1