linux boot execution script sequence

Execution sequence
1. Start vmlinuz through /boot/vm

2. init /etc/inittab

3. Start the corresponding script, and open the terminal
rc.sysinit
rc.d (the script inside)
rc.local
4. Start the login login interface login
5. The order in which the sh script is executed when the user logs in.
/etc/profile.d/file
/etc/profile
/etc/bashrc
/root/.bashrc
/root/.bash_profile will be fully executed every time the user logs in

. The execution is different from the execution when logging in.

1. The action of custom startup should be executed in rc.local. It will only be executed once when the system starts, such as setting the default java home and specifying the ip address.

2. The script for setting environment variables can be placed in the profile.d directory, but the boot execution task should not be placed in the profile.d directory, because every time you log in, the files in the profile.d directory will be executed, which will cause repeated execution.

3. rc0-6 have different meanings:
rc means Runlevel Changes (run level), there are 6 typical run levels under most linux operating systems as follows:
0 shutdown
1 single user
2 multiple users, no network connection

3 more user, start network connection
4 User-defined
5 Multi-user with graphical interface
6 Restart

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326801143&siteId=291194637