How to View Running Services in Ubuntu Terminal

Unlike a desktop computer where you physically open applications like a web browser or a word processor, a Linux server operates quietly in the background, continuously running dozens of invisible background programs called “services” or “daemons.” These services handle everything from your web server (Apache/Nginx) and database (MySQL) to your SSH connections and firewall rules.

If a website goes offline or you cannot connect to your server remotely, your first troubleshooting step must be to check if the underlying service has crashed. Ubuntu provides a powerful, built-in tool called systemctl to manage and view the status of every background process on your machine.

How to Check a Specific Service

If you know exactly which service you are troubleshooting (for example, the Apache web server), you can query its exact status instantly.

  1. Open your terminal window (or connect via SSH).
  2. Type the following command and press Enter:
systemctl status apache2

(Note: You can replace ‘apache2’ with any service name, such as ‘nginx’, ‘mysql’, or ‘ssh’).

The terminal will output a detailed log. Look for the line labelled Active:.

  • If it says active (running) in green text, the service is healthy.
  • If it says inactive (dead), the service is turned off.
  • If it says failed in red text, the service crashed, and you should read the final few lines of the output for specific error codes.

To exit the status log and return to your command prompt, press the Q key.

How to View All Currently Running Services

If you are auditing a new server and want to see exactly what software is actively consuming resources in the background, you can ask systemctl for a complete list.

  1. Run the following command:
systemctl list-units --type=service --state=running

The system will output a cleanly formatted table. It will list the technical name of the service, its current state, and a brief human-readable description of what that service actually does. You can use your keyboard’s arrow keys or the Page Down key to scroll through the list. Press Q to exit.

How to View All Installed (But Inactive) Services

Sometimes you need to know if a piece of software is installed on the machine, even if it is currently turned off or has failed to start. Removing the --state flag will show you everything.

systemctl list-units --type=service --all

This massive list will show you every single service script the operating system possesses. The “Active” column is crucial here, as it will explicitly label services as “failed” or “dead,” helping you identify background tasks that crashed silently during the last reboot.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.