Linux Command sharing: shutdown and restart, linux Command sharing

Source: Internet
Author: User

Linux Command sharing: shutdown and restart, linux Command sharing

Command display

Shutdown command

Halt immediate shutdown poweroff immediate shutdown-h now immediate shutdown-h after 10 minutes shutdown-h automatic shutdown at 10 o'clock

The "shutdown-c" command can cancel shutdown events caused by "shutdown-h-t ".

Restart command

Reboot shutdown-r now shutdown-r will automatically restart shutdown-r at after 10 minutes

The "shutdown-c" command can cancel the restart event caused by "shutdown-h-t ".

Command Introduction

Shutdown

Introduction

The shutdown command safely shuts down the system. It is very dangerous for some users to disable Linux by directly disconnecting the power supply. Different from Windows, Linux runs many processes in the background, therefore, force shutdown may lead to data loss in the process, making the system unstable, or even damaging hardware in some systems.

Shutdown parameter description:

[-T] before changing to another runlevel, tell init how long it will take to shut down;

[-R] restart the computer;

[-K] does not actually shut down, but sends a warning signal to each consumer [login 〕;

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

[-N] shut down by yourself instead of init. You are not encouraged to use this option, and the consequences of this option are not always what you expected;

[-C] cancel current process cancels the currently running Shutdown program. Therefore, this option certainly does not have a time parameter, but you can enter a message for explanation, and this information will be sent to each user.

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

[-F] force fsck when restarting the calculator [reboot;

[-Time] set the time before shutdown.

Halt

Introduction

In fact, halt calls shutdown-h. When halt is executed, the application process is killed and the sync system call is executed. After the file system write operation is completed, the kernel is stopped.

Halt parameter description:

[-N] prevents the sync system from calling. It is used to fix the root partition with fsck to prevent the kernel from overwriting the repaired super block with the old version of superblock;

[-W] is not a real restart or shutdown, but a record for wtmp (/var/log/wtmp;

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

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

[-I] disable all network interfaces before shutting down (or restarting;

[-P] this option is the default option. It is called poweroff when shutdown.

Reboot

Introduction

Except that the restart function is different from the "halt" function, the other functions are similar to "halt" and will not be described in detail.

Reboot parameter description

Except that the restart function is different from the "halt" function, the other functions are similar to "halt" and will not be described in detail.

Poweroff

Introduction

The poweroff command is used to shut down the computer's operating system and cut off the system power.

Poweroff parameter description

[-N] the sync operation is not executed when the operating system is shut down;

[-W] the operating system is not actually shut down, only in the log file "/var/log/wtmp;

[-D] When the operating system is disabled, the operation is not written to the log file "/var/log/wtmp" to add corresponding records;

[-F] disable the operating system forcibly;

[-I] disable all network interfaces before shutting down the operating system;

[-H] before shutting down the operating system, set all the hardware in the system to the standby mode.

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.