How to Learn about Linux

Source: Internet
Author: User

Recently, I have been paying close attention to the Linux operating system, saying how the Linux operating system is good, saying that the Linux code is open, the security is high, and the price is low. There is a lot of potential for windows. This article describes the links to executable files or scripts under the/etc/rc [S 0-6] Directory in Linux.

If you have some knowledge about ARM, you may find that the several interrupt tables at the absolute address 0x00000000 of ARM are similar in processing different states in Linux. For example, after ARM encounters a reset signal, it will execute the reset interrupt vector (in fact, it is also a number), while Linux encounters a switch-level signal (shutdown, halt, restart, and other signals ), it will also execute/etc/rc [0-6]. d/actions in the directory. Therefore, the software and hardware design can be used for mutual reference. Now I will give a brief introduction to the running level of Linux.

After that, there may be/etc/rc under/etc. local,/etc/rc. sysinit file, usually/etc/rc. by default, local does not do anything. It may be an interface left by the system for you to add the actions executed during system startup. It generally runs in/etc/init. d. /Etc/rc. sysinit does a lot of things in Redhat9.0, which is a bit similar to executing the actions below/etc/rcS. d.

After the system finishes init, it will first execute the initialization named "S [0-9] [0-9] init_script" under "/etc/rcS/" (if it is changed to start with "K, will not be executed), the execution order is in the ascending order of the two digits after S;

Then, you will go to/etc/inittab to define the system running level configuration file, and run/etc/rc [0-6] According to the default running level specified by initdefault. d.

Ubuntu does not adopt the traditional Linux method, but another method is used. After initialization under/etc/rcS/is executed, go to/etc/event. d/rc-default: Find the running level. This script first checks to find a single-like string from the command line of the kernel startup parameter. If yes, it defines the running level 1, otherwise, go to the/etc/inittab. If not, the default level is 2 (probably Because ubuntu is mainly for PCs, so it does not enable full-function multi-user level ).

Add a service: sudo update-rc.d srv_name defaults 99
Delete A service: sudo update-rc.d srv_name remove
Temporarily restart a service:/etc/init. d/srv_name restart
Temporarily close a service:/etc/init. d/srv_name stop
Start a service temporarily:/etc/init. d/srv_name start

When a user switches from running level 2, for example, to running level 3, /etc/rd2.d/S [0-9] [0-9] init_file_name will first execute all K scripts of running level 3 in alphabetical order, and then use "stop" as the first parameter /etc/rc3.d/K [0-9] [0-9] init_script ), run all the S scripts of Level 3/etc/rc3.d/S [0-9] [0-9] init_script) with "start" as the first parameter ).

You can use the runlevel command to view the current running level of the system, and use the telinit command to change the running level.

This article introduces the Linux operating system and hopes to help you.

  1. How to modify the PATH of the environment variable in Linux
  2. Preventing arp attacks in Linux
  3. Linux Opera easily applies scim
  4. Easily install Flash Media Server in Linux
  5. Describes how to configure the Clock Synchronization Service NTPD in Linux.

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.