shutdown: [参数][时间]
-h:关机
-r:重启
-c:取消上一次关机或重启
[[email protected] ~]# shutdown -h now ##马上重启 [[email protected] ~]# shutdown -h 20:30 ##定时20:30关机
init:系统运行级别
0: 关机
1:单用户
2:不完全多用户,不含NFS
3.完全多用户
4.未分配
5.图形界面
6.重启
[[email protected] ~]# cat /etc/inittab ##配置文件查看系统默认运行级别 # Default runlevel. The runlevels used are: # 0 - halt (Do NOT set initdefault to this) # 1 - Single user mode # 2 - Multiuser, without NFS (The same as 3, if you do not have networking) # 3 - Full multiuser mode # 4 - unused # 5 - X11 # 6 - reboot (Do NOT set initdefault to this) # id:5:initdefault: ##ps:如果把默认级别设置为0或者6.系统就会默认开机重启,嘎嘎
[[email protected] ~]# runlevel ##查询当前运行级别 N 5
logout:用户退出登录
时间: 2024-10-30 01:48:22