Read this whole guide offline with no ads, for a very low price!
Click Here!

Custom Search







Table Of Contents  CertiGuide to A+ (A+ 4 Real)
 9  Chapter 5: The Linux Operating System

Previous Topic/Section
apt-get - APT Package Handling Utility
Previous Page
Pages in Current Topic/Section
1
Next Page
chkconfig - Updates and Queries Run Level Information for System Services
Next Topic/Section

System Run Levels

The boot loader for Linux loads system kernel into memory and as soon as the kernel has as taken control of the system, it starts the first daemon, init. Init’s job is to load the other daemons, which provide essential services for Linux and monitor that they remain running. Linux can start in one of several different run levels, each of which provides a different number of services when started. The different run level functionalities are defined in the file /etc/inittab. An excerpt from this file:

# Default runlevel. The runlevels used are:

# 0 - halt

# 1 - Single user mode

# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)

# 3 - Full multiuser mode, X11 not started

# 4 - unused

# 5 - Full multiuser mode with X11

# 6 - reboot

The selected run level gives the system administrator a crude level control of the number of services (daemons) that are started. Run level one is considered a system maintenance level, where the system administrator can attend to major maintenance issues without the concern of affecting any system users or these users affecting the maintenance task that needs be performed. File system maintenance is usually done at this level.

Run level three starts all system services except for X Windows, probably the level most commonly used on a system that is running server functions only. Run level five provides all the normal system services including starting the X Windows system so that user’s will see a graphical login.

Within the directory /etc is a directory called rc.d, which further contains several directories named rc0.d through rc6.d. The links within these directories define which services will be stopped and which services will be started at the run level associated with each directory. By adding tor taking away from the links, the number of services that are started or stopped for each run level can be changed. Each of these links starts with either a k (for kill the process) or an s (to start a process), a number (to set the order in which they will run) and finally the name of a script file within the init.d directory that would be run to start or stop the service. Be certain you know what you are doing, before you add to or take away any of these links.

The initial run level for the system is defined in the file /etc/inittab immediately after the information that was shown above. The following line is an example:

id:3:initdefault:

Where the number 3 shows that, the system will start at run level three. The initial run level can be set by changing the number in this line to the different one given in the list of available run levels.

If for some reason the system administrator must change the current run level for the system (potentially for major file system maintenance) all users should be warned, and should log off. The system administrator under the root account can then issue the command:

init runlevel

Where runlevel is the number of the desired run level. The system will then go through a process of shutting off and restarting services that are appropriate to the new run level.

Quick navigation to subsections and regular topics in this section



Previous Topic/Section
apt-get - APT Package Handling Utility
Previous Page
Pages in Current Topic/Section
1
Next Page
chkconfig - Updates and Queries Run Level Information for System Services
Next Topic/Section

If you find CertiGuide.com useful, please consider making a small Paypal donation to help the site, using one of the buttons below. You can also donate a custom amount using the far right button (not less than $1 please, or PayPal gets most/all of your money!) In lieu of a larger donation, you may wish to consider buying an inexpensive PDF equivalent of the CertiGuide to A+ (A+ 4 Real) from StudyExam4Less.com. Thanks for your support!
Donate $2
Donate $5
Donate $10
Donate $20
Donate $30
Donate: $



Home - Table Of Contents - Contact Us

CertiGuide to A+ (A+ 4 Real) (http://www.CertiGuide.com/apfr/) on CertiGuide.com
Version 1.0 - Version Date: March 29, 2005

Adapted with permission from a work created by Tcat Houser et al.
CertiGuide.com Version Copyright 2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.