• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

chkconfig Command in Linux with Examples

{{postValue.id}}

chkconfig Command in Linux with Examples

chkconfig Command helps you to configure services for starting and stopping them automatically when the Operating System boots. This is configured in the scripts, /etc/rc.d/init.d. This tutorial covers the ground on installation of chkconfig command.

Command to list All Services in run-level

The &ndash list parameter displays all the services along with their current start up status in each run-level configuration.

[root@linuxhelp Desktop]# chkconfig --list
NetworkManager     0:off    1:off    2:on    3:on    4:on    5:on    6:off
abrt-ccpp          0:off    1:off    2:off    3:on    4:off    5:on    6:off
abrtd              0:off    1:off    2:off    3:on    4:off    5:on    6:off
acpid              0:off    1:off    2:on    3:on    4:on    5:on    6:off
atd                0:off    1:off    2:off    3:on    4:on    5:on    6:off
auditd             0:off    1:off    2:on    3:on    4:on    5:on    6:off
autofs             0:off    1:off    2:off    3:on    4:on    5:on    6:off
.
.
.
.
winbind            0:off    1:off    2:off    3:off    4:off    5:off    6:off
wpa_supplicant     0:off    1:off    2:off    3:off    4:off    5:off    6:off
ypbind             0:off    1:off    2:off    3:off    4:off    5:off    6:off

Command to check the Status of Specific Services in run-level

The following command shows the start up configuration for a particular service.

[root@linuxhelp Desktop]# chkconfig --list| grep nfs
nfs                0:off    1:off    2:off    3:off    4:off    5:off    6:off
nfslock            0:off    1:off    2:off    3:on    4:on    5:on    6:off

Command to start a Particular Service on Run Levels

Here we use &ndash level parameter in the chkconfig command, to start httpd services only on run level 3 and 5.

[root@tecmint ~]# chkconfig --level 35 httpd o

Similarly, we can start nfs service.

[root@linuxhelp Desktop]# chkconfig--level 35 nfs on

After assigned run level state to nfs now verify the state by following command.

[root@linuxhelp Desktop]# chkconfig --list | grep nfs
nfs              0:off    1:off    2:off    3:on    4:off    5:on    6:off

Command to check Whether the Services are On / Off state in run-level

Running the following command displays all the services, which are On and Off in run level 5.

[root@linuxhelp Desktop]# chkconfig --list | grep  5:on
NetworkManager     0:off    1:off    2:on    3:on    4:on    5:on    6:off
abrt-ccpp          0:off    1:off    2:off    3:on    4:off    5:on    6:off
abrtd              0:off    1:off    2:off    3:on    4:off    5:on    6:off
acpid              0:off    1:off    2:on    3:on    4:on    5:on    6:off
atd                0:off    1:off    2:off    3:on    4:on    5:on    6:off
auditd             0:off    1:off    2:on    3:on    4:on    5:on    6:off
[root@linuxhelp Desktop]# chkconfig --list | grep  5:off
dnsmasq            0:off    1:off    2:off    3:off    4:off    5:off    6:off
firstboot          0:off    1:off    2:off    3:off    4:off    5:off    6:off
htcacheclean       0:off    1:off    2:off    3:off    4:off    5:off    6:off
kdump              0:off    1:off    2:off    3:off    4:off    5:off    6:off
netconsole         0:off    1:off    2:off    3:off    4:off    5:off    6:off

Command to stop a Particular Service on Run Levels

Running the following command will turn Off a service named nfs for a single run level and it is also possible for turning Off a service in multiple levels as illustrated below.

[root@linuxhelp Desktop]# chkconfig --level 2 nfs off
[root@linuxhelp Desktop]# chkconfig --list | grep nfs
nfs                0:off    1:off    2:off    3:off    4:off    5:off    6:off
nfslock            0:off    1:off    2:off    3:on    4:on    5:on    6:off

If you want to give multiple run-level state you should follow the below command.

[root@linuxhelp Desktop]# chkconfig --level 234 nfs off
[root@linuxhelp Desktop]# chkconfig --list | grep nfs
nfs                0:off    1:off    2:off    3:off    4:off    5:off    6:off
nfslock            0:off    1:off    2:off    3:on    4:on    5:on    6:off

Tags:
gabriel
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

How to list audit service using chkconfig?

A

The command used to view the audit service.
chkconfig --list auditd
auditd 0:off 1:off 2:on 3:on 4:on 5:on 6:off

Q

How to turn off audit in the run levels 3,4 and 5?

A

The command to turn off the audit run levels
chkconfig --level 345 auditd off
auditd 0:off 1:off 2:on 3:off 4:off 5:off 6:off

Q

What is the command to list all startup services in alphabetic order?

A

The command to list all startup services in alphabetic order is chkconfig --list | sort | less
auditd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
...

Q

What is the command to help to view the options in chkconfig?

A

The command to view the options in the chkconfig
syntax; " chkconfig --help "

Q

How to change Linux services startup/boot order?

A

You can change the order by renaming the symlinks under /etc/rcX.d/ where x will be your run level.
chkconfig: 35 90 10

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Lucas ?
Various options in Top command

Am using Top command only to view the load average, what are the various options in Top command..??

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.