Run Levels Flashcards
(22 cards)
Runlevel 0
Halt
Runlevel S
Single-user mode (US keyboard layout)
Runlevel 1
Single-user mode
Runlevel 2
Multiuser mode without network server services
Runlevel 3
Multiuser mode with network
Runlevel 4
Not used
Runlevel 5
Multiuser mode with network and display manager
Runlevel 6
Reboot
To display the current runlevel
runlevel
The config file for init is
/etc/inittab
the scripts started by init are located at
/etc/init.d/
The default runlevel is normally
3 or 5
The services that are started in a certain runlevel are defined in:
/etc/init.d/rcx.d
The _________ directory contains shell scripts that are used to perform certain tasks at boot up
/etc/init.d/
the init.d script paramaters are:
start, restart, stop, reload, force-reload, & status.
What does /etc/init.d/boot do?
it is started directly by init when the system starts. It is run only once. it starts all the skripts linked by filenames with an āSā at the beginning of their names.
What does /etc/init.d/boot.local do?
Includes additional commands to be executed at boot before changing into a runlevel.
What does /etc/init.d/halt do?
Run if runlevels 0 or 6 are entered. it is called with either the halt command or the reboot command.
What does /etc/init.d/rc do?
This script changes from one runlevel to another. It runs the stop scripts for the current runlevel and then runs the start scripts for the new runlevel.
What does /etc/init.d/service do? (Service is generic)
Each service on your linux system comes with a script that allows you to star or stop the service, to reload its configuration, or to view its status.
To add a service with insserv:
insserv service,start=x (service is name of service, x is runlevel)
To remove a service with insserv:
insserv -r service