• 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

  • 相关阅读:
    Linux Linux程序练习一
    Linux make语法
    python类的继承的两种方式
    Django中更新多个对象数据与删除对象的方法
    admin.ModelAdmin 后台管理关联对象,某个字段怎么显示值
    jQuery插件
    python Django Nginx+ uWSGI 安装配置
    Python3中urllib详细使用方法(header,代理,超时,认证,异常处理)
    爬虫
    ftplib模块
  • 原文地址:https://www.cnblogs.com/dashouqianxiaoshou/p/5737401.html
Copyright © 2020-2023  润新知