Shutdown and restart commands in linux

Source: Internet
Author: User

In linux, the shutdown command is used to shut down and restart the server, but the following references are different.

Restart command:

1. reboot
2. shutdown-r now restarts immediately (used by the root user)
3. shutdown-r restarts automatically after 10 minutes (used by root users)
4. shutdown-r restart at (for root users)
If you use the shutdown command to set the restart, you can use the shutdown-c command to cancel the restart.

Shutdown reference

Shutdown parameter description:

[-T] before changing to another runlevel? Tell init how long it will take to shut down.

[-R] restart the calculator.

[-K] Isn't it true to shut down? Only a warning signal is sent to each login 〕.

[-H] power off after Shutdown [halt 〕.

[-N] No init? Instead, shut down the server by yourself. Are you not encouraged to use this option? In addition, the consequences of this option are not always what you expected.

[-C] cancel current process cancels the currently running Shutdown program. So this option certainly does not have a time parameter? But can I enter a message for explanation? This information will be sent to each user.

[-F] Ignore fsck when restarting calculator [reboot.

[-F] forces The fsck when restarting the calculator [reboot.

[-Time] set the time before shutdown

Shutdown command:

1. Shut down halt immediately
2. Power off immediately
3. shutdown-h now shut down immediately (used by the root user)
4. shutdown-h: shutdown automatically 10 minutes later
If you use the shutdown command to set shutdown, you can use the shutdown-c command to cancel the restart.


Parameter description:

[-N] How to Prevent sync system calls? After fsck is used to fix the root partition? To prevent the kernel from overwriting the repaired superblock with the old version of superblock.

[-W] Isn't it a real restart or shutdown? Write the wtmp (/var/log/wtmp) record.

[-D] Do not write the wtmp record [included in Option [-n 〕.

[-F] Force shutdown or restart without calling shutdown.

Before [-I] shutdown [or restart? Disable all network interfaces.

[-P] this option is the default option. Is to call poweroff when Shutdown

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.