zoukankan      html  css  js  c++  java
  • linux 关机方式

    linux 关机命令:

    1-  init 0 关机。

    具体详情接受可以 init --help 查询 如下:


    init [OPTIONS...] {COMMAND}

    Send control commands to the init daemon.

    --help Show this help
    --no-wall Don't send wall message before halt/power-off/reboot

    Commands:
    0 Power-off the machine
    6 Reboot the machine
    2, 3, 4, 5 Start runlevelX.target unit
    1, s, S Enter rescue mode
    q, Q Reload init daemon configuration
    u, U Reexecute init daemon

    2-  shutdown -h now 立刻关机 shutdown 详情介绍如下:

    --help Show this help
    -H --halt Halt the machine
    -P --poweroff Power-off the machine
    -r --reboot Reboot the machine
    -h Equivalent to --poweroff, overridden by --halt
    -k Don't halt/power-off/reboot, just send warnings
    --no-wall Don't send wall message before halt/power-off/reboot
    -c Cancel a pending shutdown

    3- halt 命令


    Halt the system.

    --help Show this help
    --halt Halt the machine
    -p --poweroff Switch off the machine
    --reboot Reboot the machine
    -f --force Force immediate halt/power-off/reboot
    -w --wtmp-only Don't halt/power-off/reboot, just write wtmp record
    -d --no-wtmp Don't write wtmp record
    --no-wall Don't send wall message before halt/power-off/reboot

    4- poweroff 

    Power off the system.

    --help Show this help
    --halt Halt the machine
    -p --poweroff Switch off the machine
    --reboot Reboot the machine
    -f --force Force immediate halt/power-off/reboot
    -w --wtmp-only Don't halt/power-off/reboot, just write wtmp record
    -d --no-wtmp Don't write wtmp record
    --no-wall Don't send wall message before halt/power-off/reboot

  • 相关阅读:
    python2的比较函数,cmp
    快速排序
    如果a,b,c为自然数,a+b+c=1000,a方+b方=c方,求出abc可能的组合(python实现)
    python之join
    python之functools partial
    Python 3 iter函数用法简述
    python线程之condition
    python 线程 event
    getattr getattribute setattr hasattr delattr
    Properties类
  • 原文地址:https://www.cnblogs.com/dashouqianxiaoshou/p/5737401.html
Copyright © 2011-2022 走看看