Linux Default bootup, Startup, Autoload Configuration file (undone)

Source: Internet
Author: User
Tags autoload

Directory

1 . Linux initialization init system 2. Linux configuration file automatic loading process

1. Linux init initialization system

Linux init init system differences under different operating system series

1 5 : Sysvinit 2 6 : Upstart 3 7: SYSTEMD

RHEL 5.x as an example to learn

The startup process of Rhel can be broadly categorized as follows:

1. Post Power -on self-test2. BIOS (Boot Sequence)3. Load the MBR (bootloader) on the corresponding boot4the master boot setting loads its bootloader5. With Grub Management, read the kernel kernel file (/boot/Vmlinuz), extract to main memory, take advantage of kernel function, perform second hardware detection (first occurs at post Post)6. Load initial RAM Disk (/boot/initrd), so that it is decompressed into the root directory in memory, kernel to complete the driver loading. Eventually release the virtual file system and mount the actual root file system6. After the core is loaded, after hardware detection and driver loading, the kernel starts the first process/sbin/init,init process will read/etc/inittab, in/etc/in Inittab, the following actions are broadly defined:1) to obtain the relevant level of runlevel, which is the default operating level2) Using/etc/rc.d/Rc.sysinit Initialization of the system3) invoke the relevant startup script according to RunLevel to start the appropriate system service4Some other system settings to finalize system startup

The order is as follows

/** * * self-startup script execution * * **/1. /etc/Inittablinux System kernel will start the first process of the whole systemThe/sbin/init,init process will read the/etc/Inittab2. /etc/rc.lcoal boot Start program3. /etc/Rc.sysinit The first script executed by Init4. /etc/rc.d/init.d/5. /etc/init.d/binary files directory for various servers and programs4. /etc/RC1) while traversal/etc/rc$runlevel.d/k*, run the default kill script2) while traversal/etc/rc$runlevel.d/s*, run the default start service5. /etc/rc$runlevel.d/The execution Program connection directory for each startup level, where the files are all pointing to the/etc/init.d/some of the soft connections6. /etc/rc.d/RC executes the corresponding directory according to the run mode (runlevel) specified by its parameters (/etc/rc.d/rc$runlevel.d/) under the script7. /etc/rc.d/rc$runlevel.d/The execution Program connection directory for each startup level, where the files are all pointing to the/etc/rc.d/rc$runlevel.d/some of the soft connections8. /etc/rc.d/rc.local User Self-ordering boot program9. /etc/rc.d/Rc.sysinit/** * * self-startup script execution * * **/

Relevant Link:

http://no001.blog.51cto.com/1142339/411951http://www.zhihu.com/question/ 20126189

1. Linux configuration file Auto-loading process

Linux has a lot of global, individual user-specific self-launch, environment parameter profiles, the order of their relationships are as follows

/** * * environment variable Settings * * **/1. /etc/PROFILE.D: Placing a script file that configures Shell information2. /etc/profile This file is set for each user of the system"Environmental Information", is a global configuration that is executed when the user logs on to the system for the first time. The shell settings are collected from the configuration file of the/ETC/PROFILE.D directory and executed one by one, which divides the configuration file into"Standalone Script Module"to improve the flexibility of the configuration of the Linux system environment variables, it is important to note that/etc/The variables set in profile (global) can act on any user3. ~/. BASHRC: This file contains bash information dedicated to each user's bash shell, which is read when logging in and every time a new shell is openedVariables set in ~/.BASHRC and so on (local) can only inherit variables from/etc/profile, they are"Father"relationships. 4. ~/. Bash_profile each user can use the file to enter shell information that is specific to their own use, and the file executes only once when the user logs on. By default, some environment variables are set to execute the user's. bashrc file5. /etc/BASHRC the user logs on to the system, the shell terminal is opened for instruction, and Linux executes the file (arbitrary instructions) for each user running the bash shell. When the bash shell is opened, the file is read (that is, each time a new terminal is opened, it will execute/etc/BASHRC)6. /etc/CSH Global profile on CSH.CSHRCBSD, BSD executes this file (arbitrary instruction) for each user running Cshell. When Cshell is opened, the file is read (that is, each time a new terminal is opened, it will execute/etc/CSH.CSHRC)7. ~/. bash_logout The file is executed every time you exit the system (Exit Bash Shell)/** * * environment variable Settings * * **/

Relevant Link:

http://huhao1989.iteye.com/blog/1586020http://blog.csdn.net/ithomer/ article/details/6322892https://wiki.freebsdchina.org/howto/c/config_your_csh

Copyright (c) Littlehann All rights reserved

Linux Default bootup, Startup, Autoload Configuration file (undone)

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.