Linux Services, Runlevels, and RC.D scripts

Source: Internet
Author: User

Reference:

[1] Https://www.linux.com/news/introduction-services-runlevels-and-rcd-scripts

A Linux Service is an application (or set of applications) that runs in the background waiting to being used, or carrying out Essential Tasks.

In the DIRECTORY/ETC/RC.D, you'll find either a set of files named rc.0, Rc.1, Rc.2, Rc.3, Rc.4, Rc.5, and Rc.6, or a s Et of directories named RC0.D, RC1.D, rc2.d, RC3.D, RC4.D, RC5.D, and RC6.D. You'll also find a file Named/etc/inittab including info about runlevels. The system uses these files (and/or directories) to control the services to be started. The boot process uses these parameters to identify the default RunLevel and the files that would be used by that runlevel.

About RunLevel, your might assume that this refers to different levels, the system goes through during a boot up. Instead, think of the runlevel as the point at which the system is entered. Runlevel 1 is the most basic configuration (simple single user access using a text interface), while Runlevel 5 is the MO St Advanced (multi-user, networking, and a GUI front end). Runlevels 0 and 6 is used for halting and rebooting the system. The following table shows a generic list of configurations (and some examples of different distros) taken from Linux- the complete Reference (R.peterson, Osbourne/mcgraw-hill).

Run level

Generic

Fedora Core

Slackware

Debian

0 Halt Halt Halt Halt
1 Single-user mode Single-user mode Single-user mode Single-user mode
2 Basic multi-user mode (without networking) User definable (Unused) User definable-configured the same as RunLevel 3 Multi-User mode
3 Full (text based) multi-user mode Multi-User mode Multi-User Mode-default Slackware RunLevel
4 Not used Not used X11 with KDM/GDM/XDM (session managers) Multi-User mode
5 Full (GUI based) multi-user mode Full multi-user mode (with a x-based login screen)-Default RunLevel User definable-configured the same as RunLevel 3 Multi-User mode
6 Reboot Reboot Reboot Reboot








The different operating levels (run level) in a Linux system represent the different operating states of the system, such as running Level 3 when the Linux server is running normally, multi-user mode capable of providing network services, and running level 1 allowing only administrators to operate through a single console of the server host, i.e. " Single-user mode.

Linux Boot Process

When you boot your computer, the first thing, the It'll do is load the bootloader--either GRUB or LILO in most cases. The bootloader would then load the Linux kernel-the core operating system. Next, a process called init starts. This process reads the file/etc/inittab to establish of the runlevel to use. The RunLevel is the start mode for the computer.

Once Init knows the runlevel it'll look for the appropriate files or directories as defined In/etc/initab.

Init would then either run the script files defined By/etc/initab, or run the script files under the directories defined by/ Etc/initab (depending on the set up of your system).

Finally, Init would present you with the logon mode, which you ve selected.

Linux Services, Runlevels, and RC.D scripts

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.