Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The difference between reboot and init 6

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Two restart commands in Linux: the difference between reboot and init 6

The init command is used to change the running level of the operating system.

Init 6 is to restart the machine.

Reboot also restarts the machine.

So what's the difference between the two commands?

Using the man command for these two operations, you can see the following:

"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 perform these procedures, and reboot is a kernel-level command that does not use shutdown scripts for applications. .

We should use init 6. 6 under normal circumstances.

Reboot-reboot performs a sync (1m) operation on the disks, and then a

Multi- user reboot is initiated. See init (1m) for details.

Init 6 Stop the operating system and reboot to the

State defined by the initdefault entry in

/ etc/inittab.

Use reboot when something goes wrong or when you force a restart.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report