系统关机注销命令

halt

作用:关闭系统

例如:

[[email protected] ~]# halt

poweroff

作用:关闭系统

例如:

[[email protected] ~]# poweroff

reboot

作用:重新启动系统

例如:

[[email protected] ~]# reboot

shutdown

作用:关闭或重启系统系统

常用参数

-h    关闭系统

[[email protected] ~]# shutdown -h now    ##关闭系统

[[email protected] ~]# shutdown -h +20    ##系统在20分钟之后关闭

Broadcast message from [email protected]
        (/dev/pts/0) at 17:29 ...

The system is going down for halt in 20 minutes!

-r    重新启动系统,相当于Windows下的restart

[[email protected] ~]# shutdown -r now    ##关闭系统后重新启动
[[email protected] ~]# shutdown -r 22:00    ##系统在22:00后重新启动

Broadcast message from [email protected]
        (/dev/pts/0) at 17:31 ...

The system is going down for reboot in 269 minutes!

init

作用:切换运行级别,后面跟对应的运行级别

例如:

[[email protected] ~]# init 0    ##关闭系统

[[email protected] ~]# init 6    ##重新启动系统

时间: 2024-08-07 14:56:09

系统关机注销命令的相关文章

Linux 系统关机重启命令

Linux 系统关机重启 关机 (系统的关机.重启以及登出 ) shutdown -h now 关闭系统(1) init 0 关闭系统(2) telinit 0 关闭系统(3) shutdown -h hours:minutes & 按预定时间关闭系统 shutdown -c 取消按预定时间关闭系统 shutdown -r now 重启(1) reboot 重启(2) logout 注销 原文地址:https://www.cnblogs.com/huao990928/p/12321815.htm

C#实现控制Windows系统关机、重启和注销的方法:

shutdown命令的参数: shutdown.exe -s:关机shutdown.exe -r:关机并重启shutdown.exe -l:注销当前用户 shutdown.exe -s -t 时间:设置关机倒计时shutdown.exe -h:休眠shutdown.exe -t 时间:设置关机倒计时.默认值是 30 秒.shutdown.exe -a:取消关机shutdown.exe -f:强行关闭应用程序而没有警告shutdown.exe -m \计算机名:控制远程计算机shutdown.ex

ubuntu 关机,重启,注销命令

1关机命令 shutdown 好像ubuntu的终端中默认的是当前用户的命令,只是普通用户,因此在终端器中可以使用sudo -sh 转换到管理员root用户下执行命令. 1)shutdown –help 可以查看shutdown命令如何使用,当然也可以使用man shutdown命令. 2) shutdown -h now 现在立即关机 3)shutdown -r now 现在立即重启 4)shutdown -r +3 三分钟后重启 5)shutdown -h +3 “The System wi

C#实现控制Windows系统关机、重启和注销的方法

shutdown.exe -s:关机shutdown.exe -r:关机并重启shutdown.exe -l:注销当前用户 shutdown.exe -s -t 时间:设置关机倒计时shutdown.exe -h:休眠shutdown.exe -t 时间:设置关机倒计时.默认值是 30 秒.shutdown.exe -a:取消关机shutdown.exe -f:强行关闭应用程序而没有警告shutdown.exe -m \计算机名:控制远程计算机shutdown.exe -i:显示"远程关机&qu

系统关机、重启、注销详解

在重新启动Linux系统的同时把内存中的信息写入硬盘,应使用()命令实现 #shutdown -r now #halt #reboot #init3 正确答案:A halt是最简单的关机命令,其实际上是调用shutdown -h命令.halt执行时,杀死应用进程,文件系统写操作完成后就会停止内核. halt命令的部分参数如下: [-f]  force 没有调用shutdown而强制关机或重启 [强烈不建议使用该命令] [-i] 关机或重新启动之前,关掉所有的网络接口 [-p]  poweroff

C#控制Windows系统关机、重启和注销的代码

如下资料是关于C#控制Windows系统关机.重启和注销的代码. protected void btnShutDown_Click(object sender, EventArgs e) { } protected void btnRestart_Click(object sender, EventArgs e) { } protected void btnLogOff_Click(object sender, EventArgs e) { } 原文地址:https://www.cnblogs.

linux系统上的命令

一.命令的一般格式 一般格式:命令+参数+对象具体的可以man一个命令来看. command [options] [arguments]command:命令options:  --单词   或   -单字如: ls --allequ     ls -als -a -b -cequ    ls -abcargument:参数 二.命令格式中的符号含义 在查看命令帮助时,会出现[],<>,|等符号,它们的含义如下: []       表示是可选的; <>       表示可变选项,一般

Python学习记录——Ubuntu(一)基本配置、快捷键和系统启停命令行

一.常用的获取帮助方法: 1.-h 2.--help 3.man man 章节 查找的信息 #用于查询某指令在某章节中的帮助信息 man -f  #精确查找 man -k  #模糊查找 4.info 二.用命令行安装软件: apt-cache search package  #查找软件包并安装 apt-cache show package  #获取安装包的详细信息 apt-get update/install/remove/purge(删得更干净)package /etc/apt/sources

第3章 Linux常用命令(6)_关机重启命令

8. 关机重启命令 8.1 关机重启命令 (1)shutdown [选项] 时间     ①选项 -c:取消前一个关机命令 -h:关机 -r:重启 ②应用举例:#shutdown –h now.shutdown –h 20:30 (2)其它关机命令 ①halt ②poweroff ③init 0 (3)其它重启命令:①reboot ②init 6 8.2 系统运行级别 (1)运行级别(可通过cat /etc/inittab查看) 级别 含义 备注 0 关机 如init 0.不能设为默认级别. 1