Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Differences between / etc/rc.d and / etc/rc/local files

Shulou Source: shulou.com Published: 2022-06-01 08:01:58 11月09日 Update

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.

Tags: Level run system file status user directory login backward beginning console mode control service under commands graphics file names permissions scripts Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple OPPO Reno Redmi Microsoft Shulou Tech Info