Press Ctrl/Cmd + P to print
or save as PDF

Listing Out Services in Linux Based VPS Quick Guide

It is crucial to manage services and it can also be really difficult at times without the right tools. Most of the resources on a VPS are usually monitoring software to make resources easier to monitor. Services are programs that are running most of the in the background, which means they usually don’t have an interface. In this tutorial, you will be able to learn how to list out the services on Linux based VPS. The commands that are present in this guide are compatible with both CentOS and Ubuntu.

Why is listing services in VPS needed to begin with? It is used for troubleshooting issues which are important when trying to solve some of the possible issues, such as being unable to access localhost. There are high chances that this happens due to the http service being disabled, but there are other chances of it being other issues too.

Before starting to list out the services in your VPS, it is required to connect to the server using a SSH.

To list the services in your VPS, you need to be signed in as the root user.

su

To list all services in the Linux operating system, type in the following in yout terminal and run it.

sudo systemctl list-unit-files --type service --all

After running the command, you will be able to see a list of services revealed on the system. You will also be able to see their defined status and here is what each of those meant.

  • Enabled – These are the services that are currently still running in the background
  • Disabled – These are services that are currently not active, but could still be activated when necessary.
  • Masked – These are services that wouldn’t be able to run until a part of the property is taken away from them.
  • Static – These are services won’t run unless another service requires them.

For the case where you only wanted to monitor the running services, you could use the following command with the grep option as shown below.

sudo systemctl | grep running

These are all you need for listing out services for a Linux VPS.