The init process is the parent process of all Linux processes
init command is a process initialization tool under Linux. The init process is the parent process of all Linux processes, and its process number is 1. The init command is one of the indispensable programs in the Linux operating system. The init process is booted and run by the Linux kernel and is the first process in the system.
init(options)(parameters)
-b: Enter single-user mode directly without executing relevant scripts;
-s: Switch to single-user mode.
Running level: Specify the running level to which the Linux system is to be switched.
Several commonly used commands
View system process command: ps -ef | head
View the init configuration file: more /etc/inittab
View the current running level of the system: runlevel
Runlevel
What exactly is a run level? Simply put, the run level is the functional level at which the operating system is currently running. This level goes from 0 to 6 and has different functions. You can also view its English introduction in /etc/inittab
.
#0 shutdown (never set initdefault to 0)
#1 Single User Mode
#2 Multiple users, no NFS (similar to level 3, some services will be stopped)
#3 Full multi-user mode
#4 Not used
#5 x11(Xwindow)
#6 Restart (never set initdefault to 6)