Red Hat / CentOS: Check / List Running Services

by on January 14, 2009 · 14 comments· LAST UPDATED January 14, 2009

in , ,

Q. How do I list all currently running services in Fedora / RHEL / CentOS Linux server?

A. There are various ways and tools to find and list all running services under Fedora / RHEL / CentOS Linux systems.

service command - list running services

service --status-all
service --status-all | grep ntpd
service --status-all | less

Print the status of any service

To print the status of apache (httpd) service:
service httpd status

List all known services (configured via SysV)

chkconfig --list

List service and their open ports

netstat -tulpn

Turn on / off service

ntsysv
chkconfig service off
chkconfig service on
chkconfig httpd off
chkconfig ntpd on

ntsysv is a simple interface for configuring runlevel services which are also configurable through chkconfig. By default, it configures the current runlevel. Just type ntsysv and select service you want to run:

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 14 comments… read them below or add one }

1 sankar January 22, 2009 at 7:43 am

it is help to view port status and services

Reply

2 Diabolic Preacher January 23, 2009 at 3:58 pm

would these work on a ubuntu-server install? i would really have some use for commands to list running services.

Reply

3 nixCraft January 23, 2009 at 8:56 pm

Yes, it should work – if you have sysvconfig package installed.

Reply

4 Diabolic Preacher January 24, 2009 at 2:50 am

thanks vivek, am hoping its already installed coz on a server you definitely wanna check on services.
but isn’t it like ubuntu doesn’t follow the SysV model, especially in terms of the init system but has its own upstart something?

Reply

5 anderson July 1, 2009 at 5:44 pm

service httpd mysqld tomcat5 start/stop/restart/status
chkconfig service on/off
netstat -tulpn
ntsysv gui
service service start is different from chkconfig , when the server is rebooted , service start will not work .

Reply

6 Scott July 5, 2009 at 10:41 pm

In debian/ubuntu, install sysv-rc-conf and sysvinit-utils. That’s the first thing I do on any .deb box. These should be default with debian and ubuntu installs, IMO.

Reply

7 dragmore January 5, 2010 at 12:54 pm

I would love an article discribing all the “default” services in a Centos 5.x installation and which to keep for performance and secrutiy and which to turn off. Basically discribing the more common ones.
When i list with ntsysv i see a ton i have no clue what really does ;)

Reply

8 thiyagi December 23, 2010 at 11:42 am

thanks, that was really useful..

Reply

9 chanvoeu February 9, 2011 at 8:16 am

Dear sir!
Right now i have some question about Centos.
i can not configure some main service dns, apache …
please you help me!!!

Reply

10 toto March 7, 2011 at 7:52 am

nice information. thank you

Reply

11 chapise November 24, 2011 at 1:30 am

:D thank you so much dude,

Reply

12 t April 8, 2013 at 11:19 am

netstat -tulpn

Reply

13 garb May 23, 2013 at 7:27 am

For Ubuntu 12.04, you can list service status with 2 commands (first for SysV services and second for upstart services):

service –status-all
initctl list

Reply

14 deepak April 16, 2014 at 2:45 pm

hi guys please help me out,
i have to run “.jar” as service in centos32 machine.
how can i do that…

Reply

Leave a Comment

Tagged as: , , , , , , , , , , , ,

Previous Faq:

Next Faq: