Chkconfig-- what are the 0-6 in chkconfig result?

what are the 0-6 in chkconfig result ?

Example

chkconfig --list|grep iptables
iptables        0:off   1:off   2:on    3:on    4:on    5:on    6:off

Solution 1:

The different numbers correspond with the different runlevels for that service.

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.

Wikipedia has a detailed explanation on the different runlevels (they can also vary in meaning depending on the base system) if you need more specific information.

Solution 2:

Those are System V runlevels.

Solution 3:

These numbers are indiacate runlevels decides which process or program to be executed at startup. All these things are defined in /etc/inittab. Linux distributions has seven different runlevels and at the time of startup init process checks which runlevel is running and on the basis of that it executes the process and services. In the boot procedure init is the last step which is responsible for the execution of services.

Runlevel is a system state in which typically the advanced administration over Linux can be done by switching between them.

  • Understanding Runlevels and switching between them