A service is a long running executable which does require any user intervention and is configured to start when the operating system is booted.
On Windows, the services are managed via
services.msc and you can also communicate with a NT service using the SC tool.
On Linux the services can be controlled via the
chkconfig command line tool.
Usage details of
chkconfig is shown below:
chkconfig –list [name]
chkconfig –add <name>
chkconfig –del <name>
chkconfig [–level <levels>] <name> <on|off|reset>
Del options are used to create or delete services for management. A service can be activated or deactivated using the
off flags. Note that you have to mention the runlevel using the
The absensce of this runlevel will lead to the settings being applied to the current runlevel.
<name> argument refers to the name of the service and this can be found by referring to the
/etc/init.d director on Linux, which is a central repository for all startup scripts.
Also note that chkconfig modifies the data on /etc/rc[0-6].d directories and not the actual startup scripts.
A much faster way of enabling or disabling Linux services is by using the
The command lists the services available on the repository (/etc/init.d) and enables the user to disable/enable services in one shot.
Also if the service name looks too cryptic, you can always press F1 to get more information about the selected service.
As with chkconfig, if you need to control the services at multiple runlevel’s you need to invoke
ntsysv with the
ntsysv --level 345 will configure the services on runlevel 3, 4 and 5.
If you are a Linux newbie, Linux.com has an excellent introduction to Services, runlevel’s and rc.d scripts.
Note: In Debian, services are managed using the