linux中关机重启命令
shutdown
解释
关机重启命令
语法
shutdown [选项] 时间 -c 取消前一个关机命令 -h 关机 -r 重启
示例
# 现在立刻关机 shutdown -h now # 定时关机 shutdown -h 20:30 # 现在立刻重启 shutdown -r now
其他关机命令
halt poweroff init 0
其他重启命令
reboot init 6
系统运行级别
关机 单用户(启动最小的服务,用来做修复,类似windows安全模式) 不完全多用户,不含NFS(network file system)服务 完全多用户 未分配 图形界面 重启
查看运行级别的方法
cat /etc/inittab 上面的centos7 已取消运行级别,使用targets取代 [1hh0kkwoiz ~]# cat /etc/inittab # inittab is no longer used when using systemd. # # ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM. # # Ctrl-Alt-Delete is handled by /usr/lib/systemd/system/ctrl-alt-del.target # # systemd uses 'targets' instead of runlevels. By default, there are two main targets: # # multi-user.target: analogous to runlevel 3 # graphical.target: analogous to runlevel 5 # # To view current default target, run: # systemctl get-default # # To set a default target, run: # systemctl set-default TARGET.target # 查看运行级别 systemctl get-default [ ~]# systemctl get-default multi-user.target # multi-user.target: analogous to runlevel 3 # graphical.target: analogous to runlevel 5
logout
解释
退出登录
相关推荐
数据人 2013-08-08
Jesus0 2019-12-02
xiaohouye 2019-12-01
LUOPING0 2019-11-10
SoarFly00 2010-12-08
wanggongzhen 2017-02-11
dongfangxiaozi 2015-05-05
MrRaoJL 2012-10-05
85236931 2016-07-23
82286735 2016-04-16
jiangxinyu 2012-04-19
Ljwdy00 2015-12-14
小惠 2011-12-09
梁柏林 2015-10-14
87286336 2015-09-24
jiangxinyu 2011-10-20
85206935 2015-08-14