Linux Private Services: Operating mode, user and group management, network management, SSH services.
Operating mode
Linux boot
Traditional Linux booting is handled by the INIT process. For example, CentOS starts with Init.
Upstart, Epoch, Muda and systemd are all alternatives. For example, Ubuntu uses upstart boot.
Init
Linux boot;
Find bios;
The BIOS finds the first boot device (usually the hard disk);
Find the MBR on the device, load the MBR and give control to the MBR, then the boot process is controlled by the MBR;
MBR initialization boot program (usually grub);
Grub load kernel module;
The kernel module looks for/sbin/init and executes, that is, the INIT process is the parent process of all other processes;
Init reads the configuration file/etc/inittab determines the operating level of the OS;
Init reads/etc/fstab to find partition table information and mount it;
Init initializes and starts all services/scripts in/ETC/INIT.D (one service per start, at the specified default level).
# PS-EF|GREP Init
Root 1 0 2 10:48? 00:00:02/sbin/init//Process ID is always 1
Centos
0: Turn off the machine. The system default run level cannot be set to 0, otherwise it cannot be started.
1: Single user mode, only allow the root user to maintain the system.
2: Multi-user mode, but cannot use NFS (equivalent to a network Neighborhood under Windows)
3: Multi-user mode for character interface.
4: Not defined.
5: Multi-user mode for graphical interface.
6: Reboot. You cannot set the system default run level to 0, or it will restart all the time.
Configuration file:/etc/inittab
Ubuntu
0–halt, Shutdown mode
1–single, single-user mode
2-full Multi-User with Display Manager (GUI)
3-full Multi-User with Display Manager (GUI)
4-full Multi-User with Display Manager (GUI)
5-full Multi-User with Display Manager (GUI)
6–reboot, restart
Configuration file: Upstart based on work and events, no/etc/inittab/by default.
# RunLevel
N 5
# Who-r
Run Level 5 2018-07-27 10:48
linux-own service-operating mode