Article Title: How to enable a program on a Linux system to run automatically after it is started. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Linux has its own complete startup system, which captures the context of Linux Startup. the Linux Startup Process will no longer be mysterious.
Before reading this document, we recommend that you take a look at the figure.
In this article, we assume that the init tree set in inittab is:
/Etc/rc. d/rc0.d
/Etc/rc. d/rc1.d
/Etc/rc. d/rc2.d
/Etc/rc. d/rc3.d
/Etc/rc. d/rc4.d
/Etc/rc. d/rc5.d
/Etc/rc. d/rc6.d
/Etc/rc. d/init. d
1. about Linux Startup
Init is the father of all processes
Init reads/etc/inittab and executes the rc. sysinit script.
(Note that the file name is not certain. Some unix statements may even be written directly in the inittab)
The rc. sysinit script has done a lot of work:
init $PATH config network start swap function set hostname check root file system, repair if needed check root space ....
|
Rc. sysinit: Execute rc according to inittab ?. D script
Linux is a multi-user system, and getty is the watershed between multiple users and individual users.
The system script is run before getty.
[1] [2] [3] Next page