Network Gate

Answers worth knowing

loaderbig Configuring Linux Services

Configuring Linux Services

Having identified, and possibly changed the runlevel your system will boot to you can now control which services you want to be automatically started at boot time. As mentioned previously it is important to avoid having any services running that you don't actually need. Every server is a potential access point into your Linux server so it is good practice to turn off anything you don't think you will use. Bear in mind that you can always turn on a service at a later date if you find you need it.

There are number of ways to control what services get started using both command line and graphical tools without having to delve into the depths of your Linux system.

The command line tool chkconfig (usually located in /sbin) can be used to list and configure which services get started at boot time. To list all service settings run the following command:

    /sbin/chkconfig --list

This will display a long list of services showing whether or not they are started up at various runlevels. You may want to narrow the search down using Linux grep command. For example to list the entry for the HTTP daemon you would do the following:

    /sbin/chkconfig --list | grep httpd

which should result in something like:

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

Alternatively you may just be interested to know what gets started for runlevel 3:

    /sbin/chkconfig --list | grep '3:on'

chkconfig can also be used to change the settings. If we wanted the HTTP service to start up when we at runlevel 5 we would issue the following command:

    /sbin/chkconfig --level 5 httpd on

A number of graphical tools are also available for administering services. On RedHat 9 you can run the following command:


The equivalent command on RedHat Fedora Core is:


The above graphical tools allow you to view which services will start for each runlevel, add or remove services for each runlevel and also manually start or stop services.

Another useful tool if you do not have a graphical desktop running or access via a remote X server is the ntsysv command. ntsysv resides in /sbin on most systems. Whilst a convenient tool when you don't have an X server running the one draw back of ntsysv is that it only allows you to change the settings for the current runlevel.

Network Gate and ITTuva

Network Gate and ITTuva is a software design and development company that provides end-to-end development service for web and mobile development. We work on a wide range of technologies ranging from open source to proprietary and custom built solutions.

Follow Us

Subscribe Us

If you have a great new tip, are interested in development on Network Gate, thinking about possible partnership opportunities, want to find out more about our upcoming events, would like to write a guest post, or just want to say "hello," be sure to drop us a line.


Address: Via Vittorio Emanuele, 196, 95131 Catania CT, Italia, Sicilia
Phone: (370) 689 01259

Cron Job Starts