linux关机重启命令

1.shutdown

-c 取消前一个关机命令(-c   cancel a running shutdown)

-h 关机 (-h   halt or power off after shutdown )

-r 重启( -r   reboot after shutdown )

[[email protected] ~]# shutdown -h now

2.其他关机命令

[[email protected] ~]# halt

[[email protected] ~]# poweroff

[[email protected] ~]# init0

3.其他重启命令

[[email protected] ~]# reboot
[[email protected] ~]# init 6

4.系统运行级别

0 关机(halt)

1 单用户(Single user mode)

2 不完全多用户,不含NFS服务(不包含NFS服务的命令行)(Multiuser, without NFS (The same as 3, if you do not have networking))

3 完全多用户(完全的命令行)(Full multiuser mode)

4 未分配( unused)

5 图形界面(X11)

6 重启( reboot )

修改系统默认运行级别

[[email protected] ~]# cat /etc/inittab

id:5:initdefault:

查询系统运行级别

[[email protected] ~]# runlevel
N 5

5.退出登录命令

[[email protected] ~]# exit

[[email protected] ~]# logout


linux关机重启命令