【linux】关机重启命令

【linux】关机重启命令,第1张

【linux】关机重启命令

shutdown: [参数][时间]

-h:关机

-r:重启

-c:取消上一次关机或重启

[root@paulinux ~]# shutdown -h now  ##马上重启
[root@paulinux ~]# shutdown -h 20:30 ##定时20:30关机

init:系统运行级别

    0: 关机

    1:单用户

    2:不完全多用户,不含NFS

3.完全多用户

4.未分配

5.图形界面

6.重启

[root@paulinux ~]# 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.系统就会默认开机重启,嘎嘎
[root@paulinux ~]# runlevel ##查询当前运行级别
N 5

 logout:用户退出登录

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/586127.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-12
下一篇 2022-04-12

发表评论

登录后才能评论

评论列表(0条)

保存