Differences between / etc/rc.d and / etc/rc/local files
There are 7 startup levels in Linux
Runlevel 0: the system is down. The default runlevel of the system cannot be set to 0, otherwise it cannot start normally.
Runlevel 1: single user working status, root permissions, for system maintenance, no remote login
Runlevel 2: multi-user status (no NFS)
Runlevel 3: full multi-user state (with NFS), enter console command line mode after login
Runlevel 4: system not in use, reserved
Run-level 5:X11 console, log in and enter graphical GUI mode
Runlevel 6: the system shuts down and restarts normally. The default runlevel cannot be set to 6, otherwise it cannot start normally.
Under / etc/rc.d, there are seven directories called rcN.d, corresponding to the seven run levels of the system.
The system will enter the corresponding rcN.d directory according to the specified run level and retrieve the linked files in the directory according to the order of file names.
For files that start with K, the system will terminate the corresponding service
For files that start with S, the system will start the corresponding service
Where rc.sysinit is the system initialization script and rc.local is the file that needs to be executed when the user is customized to start.