• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

chkconfig: command not found

by admin

The chkconfig command can be used to control services at each runlevel. It can also be used to start or stop services during system startup.

Syntax

The syntax of the chkconfig command is:

# chkconfig [options] [service] [subcommand]

The following are some subcommands and options that can be used with chkconfig to control services.

Option Used To
{service} on Enable a service to be started on boot.
{service} off Disable a service so that it is no longer started on boot.
{service} reset Reset the status of a service.
–level {runlevel} Specify the runlevel in which to enable or disable a service.

If you encounter the below error while running the chkconfig command:

chkconfig: command not found

you may try installing the below package as per your choice of distrribution:

OS Distribution Command
Debian apt-get install chkconfig
CentOS yum install chkconfig
Fedora dnf install chkconfig
Raspbian apt-get install chkconfig

chkconfig Command Examples

1. To see the current runlevel states for all the services:

# chkconfig --list 

2. To list a particular service status:

# chkconfig --list nfs 

3. To add a service script into the runlevel:

# chkconfig --add /etc/init.d/myservice.sh 

4. To delete a service script from the runlevels:

# chkconfig --del /etc/init.d/myservice.sh 

5. To specify the runlevel for any service, which should pertain to it:

# chkconfig --level

6. Enable service at boot:

# chkconfig sshd on

7. Enable service at boot for runlevels 2, 3, 4, and 5:

# chkconfig --level 2345 sshd on

8. Disable service at boot:

# chkconfig ntpd off

9. Disable service at boot for runlevel 3:

# chkconfig --level 3 ntpd off

Filed Under: Linux

Some more articles you might also be interested in …

  1. identify Command Examples
  2. “git tag” Command Examples
  3. 18 Practical tcpdump Command Examples – A Network Sniffer Tool Primer
  4. clang-tidy: An LLVM-based C/C++ linter to find style violations, bugs and security flaws through static analysis
  5. dvc freeze: Freeze stages in the DVC pipeline
  6. lnav Command Examples in Linux
  7. “git log” Command Examples
  8. “userdel: user xxx is currently used by process yyy” – Unable to delete an User
  9. aura Command Examples
  10. a2query Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright