How to list all services on RHEL 6 and RHEL 7 ?

Today in this article we will look how to list all services on Red Hat Enterprise Linux 6 and 7.

The command is very useful to check and search for specific services on system.

I. RHEL 7 or CentOS 7

bash-4.2# systemctl list-units --type service --all | grep -i http
  ngedaemon-nginx.service                                 loaded    active   running The nginx HTTP and reverse proxy server
  ngedaemon-php-fpm.service                               loaded    active   running The nginx HTTP and reverse proxy server
  nginx.service                                         loaded    active   running The nginx HTTP and reverse proxy server

 

II. RHEL 6 or CentOS 6

bash-4.2# service --status-all | grep -i http
bash-4.2# 

In above example, we have searched for http service from the list of all services.

This command is sometimes very useful to search for specific service and then to stop/start it.

Leave a Reply

Your email address will not be published.