chkconfig--chkconfig 结果中的 0-6 是什么?

use*_*956 4 linux chkconfig

chkconfig 结果中的 0-6 是什么?

例子

chkconfig --list|grep iptables
iptables        0:off   1:off   2:on    3:on    4:on    5:on    6:off
Run Code Online (Sandbox Code Playgroud)

小智 12

不同的数字对应于该服务的不同运行级别。

ID      Name                Description
---------------------------------------
0       Halt                Shuts down the system.
1       Single-user Mode    Mode for administrative tasks.
2       Multi-user Mode     Does not configure network interfaces and does not export networks services.
3       Multi-user Mode with Networking     Starts the system normally.
4       Not used/User-definable     For special purposes.
5       Start the system normally with appropriate display manager. (with GUI)  Same as runlevel 3 + display manager.
6       Reboot              Reboots the system.
Run Code Online (Sandbox Code Playgroud)

如果您需要更具体的信息,维基百科对不同的运行级别(它们的含义也可能因基本系统而异)有详细说明。