Linux command details-reboot, halt, poweroff

Source: Internet
Author: User
& Amp; 65279; & amp; 65279; after reading the man help information of the three commands: reboot, halt, and poweroff, it is found that the same functions are implemented. Purpose: Restart or disable the system syntax: reboot [options] halt [options] poweroff [options] Description: In part 1

Reboot, halt, poweroff

After reading the man help information of these three commands, we found that the same functions are implemented.

Purpose:

Restart or shut down the system

Syntax:

Reboot [options]

Halt [options]

Poweroff [options]

Description:

In some special cases, you can directly call the reboot system call itself to directly restart the system. In other cases, you can only call the shutdown command and add appropriate parameters to complete the corresponding functions.

Main parameters:

-F, -- force

Do not call shutdown, direct to action.

-P, -- poweroff

Behave aspoweroff

-W, -- wtmp-only

Do not perform shutdown or restart, but write the shutdown record to/var/log/wtmp.

-- Verbose

Output more comments for debugging

Affected files:

/Var/run/utmp

Modify the running level

/Var/log/wtmp

After the shutdown information is attached to this file

Example:

Do not perform shutdown or restart, only add Records

Sudo halt -- wtmp-only

Shut down and output comments

Sudo halt -- verbose

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.