Forrest logo
back to the chkconfig tool

chkconfig:tldr:74227

chkconfig: Show a service's runlevel.
$ chkconfig --list ${ntpd}
try on your machine

The command "chkconfig --list ${ntpd}" is used to view the status of a specific service, in this case, the ntpd service.

Here's a breakdown of the command:

  • "chkconfig" is a command-line tool in Linux used to manage system services.
  • "--list" is an option that specifies the action to list the status of services.
  • "${ntpd}" is a variable placeholder that represents the name of the service being checked (in this case, ntpd).

When executed, this command will list the status of the ntpd service, indicating whether it is enabled to start automatically at system boot or not. It will display output similar to:

ntpd           0:off   1:off   2:on    3:on    4:on    5:on    6:off

In the output:

  • The service name "ntpd" is displayed.
  • The numbers represent different runlevels (0 to 6) where the service is either on (enabled) or off (disabled).
    • Runlevels 0, 1, and 6 indicate the system is shutting down, in single-user mode, or rebooting, respectively.
    • Runlevels 2 to 5 are multi-user modes.
  • In this example, ntpd is enabled (on) for runlevels 2, 3, 4, and 5, meaning it will start automatically when the system boots into these runlevels. It is disabled (off) for runlevels 0, 1, and 6.
This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the chkconfig tool