The init command is used to change the operating level of the operating system. Init6 restarts the machine. Reboot also restarts the machine. So what are the differences between the two commands? The following figure shows the two operations using the man command: init6Stoptheoperatingsystemandreboottothestate
The init command is used to change the operating level of the operating system.
Init 6 restarts the machine.
Reboot also restarts the machine.
So what are the differences between the two commands?
Use the man command to view the two operations as follows:
Init 6 Stop the operating system and reboot to
State defined by the initdefault entry in
/Etc/inittab.
Reboot-reboot performs a sync (1 M) operation on the disks, and then
Multi-user reboot is initiated. See init (1 M) for details.
"Init 6" is based on a series of/etc/inittab files, and each application has a corresponding shutdown script.
Init 6 calls a series of shutdown scripts (/etc/rc0.d/K *) to gracefully shut down the system;
Reboot does not execute these processes. reboot is a kernel-level command and does not use the shutdown script for applications. .
We should usually use init 6.
Use reboot in case of a problem or force restart.