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. SQL(基于MySQL)——LIMIT用法

    mysql支持limitselect * from tablename limit n,mn:表示从第几行开始,mysql的行数是从0开始标注. m:表示要显示几行: 例如:select * from ...

  2. SQL Server三种表连接原理

    在SQL Server数据库中,查询优化器在处理表连接时,通常会使用一下三种连接方式: 嵌套循环连接(Nested Loop Join) 合并连接 (Merge Join) Hash连接 (Hash ...

  3. java 转义字符

    \t 相当于tab,缩进\n 回车\r 换行\b 换成 一个黑点

  4. [Java] Servlet 3 —— 用Java生成GET/POST请求

    Servlet是SUN指定的Java服务器端编程规范,用以处理来自客户端的请求,处理并做出响应的一套基础API.Servlet是运行在 Servlet容器中的Java小程序,容器运行在服务器端,服务器 ...

  5. Android 高级UI设计笔记22:Android 指示引导页(带圆点)

    1. 引导页: 我们在安装某个软件首次运行时,大部分都会有一个引导页的提示,介绍软件新功能的加入或者使用说明等,支持滑动且下面会有几个圆点,显示共有多少页和当前图片的位置,类似如下效果: 2. 引导页 ...

  6. Oracle 约束类型

    在Oracle中的约束类型:NOT NULLUNIQUE KeyPRIMARY KEYFOREIGN KEYCHECK create table emp--创建表格 ,注意约束( empno numb ...

  7. [转]Advanced Oracle SQL Developer Features

    本文转自:http://www.oracle.com/technetwork/cn/server-storage/linux/sqldev-adv-otn-092384.html Advanced O ...

  8. Java多线程之线程池

    现在是多核的时代,面向多核的编程很重要,因此基于java的并发和多线程开发非常重要. 线程池是于队列密切相关的,其中队列保存了所有等待执行的任务.工作者线程的任务很简单:从队列中获取一个任务,执行任务 ...

  9. 让TabelView视图中自定义的Toolbar固定(不随cell的移动而移动)

    //在viewDidLoad方法中创建Toolbartoolbar = [[UIView alloc] initWithFrame:CGRectMake(, , , )]; toolbar.backg ...

  10. 【CSS3】---结构性伪类选择器-first-child+last-child

    结构性伪类选择器—first-child “:first-child”选择器表示的是选择父元素的第一个子元素的元素E.简单点理解就是选择元素中的第一个子元素,记住是子元素,而不是后代元素. 示例演示 ...