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 关机方式的更多相关文章

  1. linux关机重启命令浅析

    linux关机重启命令 今天我们来介绍下linux系统中常用到的关机重启命令—shutdown.halt.reboot.poweroff以及init. shutdown命令 以安全的方式关闭系统或重启 ...

  2. Linux 关机 休眠, 关闭移动设备自动挂载 命令

    "+++++++++++++++++++++++++ Linux 关机.休眠命令 +++++++++++++++++++++++++++++++++++++++"indows7关机 ...

  3. Linux关机时执行指定脚本

    要实现在Linux关机时执行某个脚本的具体思路 1.在文件夹 /etc/init.d/ 下创建关机时需要执行的脚本 file_name; 2.分别在文件夹 /etc/rc0.d/ 和 /etc/rc6 ...

  4. Linux关机指令详解

    Linux关机指令 在linux领域内大多用在服务器上,很少遇到关机的操作.毕竟服务器上跑一个服务是永无止境的,除非特殊情况下,不得已才会关机. 正确的关机流程为:sync > shutdown ...

  5. Linux正确的关机方式

    本人还未入门,仅看书所得. Linux不建议的是直接关电源.Linux后台可能有多人在工作,直接关电源可能造成文件的毁坏. 正常关机之前应该干两件事:一.查看一下谁在线:二.通知一下别人啦,通知别人可 ...

  6. 2、Linux的关机方式

    shutdown 关机指令,你可以man shutdown 来看一下帮助文档.例如你可以运行如下命令关机: shutdown –h 10 ‘This server will shutdown afte ...

  7. Linux笔记之——Linux关机命令详解(转)

    原文连接:http://www.jb51.net/os/RedHat/1334.html 在linux下一些常用的关机/重启命令有shutdown.halt.reboot.及init,它们都可以达到重 ...

  8. linux 关机命令总结

    linux下常用的关机命令有:shutdown.halt.poweroff.init:重启命令有:reboot.下面本文就主要介绍一些常用的关机命令以及各种关机命令之间的区别和具体用法. 首先来看一下 ...

  9. Linux 关机命令详解

    在linux下一些常用的关机/重启命令有shutdown.halt.reboot.及init,它们都可以达到重启系统的目的,但每个命令的内部工作过程是不同的,通过本文的介绍,希望你可以更加灵活的运用各 ...

随机推荐

  1. .Net MVC 4 Web Api 输出Json 格式

    1.Global 中增加json输出 GlobalConfiguration.Configuration.Formatters.JsonFormatter.MediaTypeMappings.Add( ...

  2. 【Shell脚本学习7】Shell脚本学习指南分享

    http://yunpan.cn/cyARvNiaiLhfR (提取码:2878)

  3. UILabel的简单用法和实际操作

    1.UILabel   **//设置文字 label.text = @"欢迎收看灌篮高手,我是安溪教练";**//设置文字颜色label.textColor = [UIColor  ...

  4. 控制HTML元素的显示与隐藏——display和visibility

    有些时候我们需要根据某些条件来控制Web页面中的HTML元素显示还是隐藏,可以通过display或visibility来实现.通过下面的例子了解display和visibility的区别,简单的例子代 ...

  5. ng-model 指令

    ng-model 指令 绑定 HTML 元素 到应用程序数据. ng-model 指令也可以: 为应用程序数据提供类型验证(number.email.required). 为应用程序数据提供状态(in ...

  6. angularJs中图表功能(有集成框架)-angular-flot

    1.柱状图和折线图的数据格式: $scope.Chart.data = [ { label: "离线", data: [[0, 2]] }, { label: "在线&q ...

  7. Python之随机数

    import numpy as np list = range(3) # 0 1 2 np.random.shuffle(list)#2 1 3,打乱了list import randomprint ...

  8. 【CSS3】---text-overflow 与 word-wrap

    text-overflow用来设置是否使用一个省略标记(...)标示对象内文本的溢出. 语法: 但是text-overflow只是用来说明文字溢出时用什么方式显示,要实现溢出时产生省略号的效果,还须定 ...

  9. 基于asp.net MVC 的服务器和客户端的交互(三)之客户端请求响应

    一.分析 WEB API 中HTTP 请求方式的四个主要方法 (GET, PUT, POST, DELETE), 按照下列方式映射为 CURD 操作: GET 用于获取 URI 资源的进行展示,GET ...

  10. HDU1358:Period

    第一次做KMP.还没有理解透. 在自己写一遍时没有让next[0]初始化为-1. 还有就是next应该是c++中的关键字,提交后编译错误. From: http://blog.csdn.net/lib ...