Your cart is currently empty!
How to List Linux Services With the systemctl Command
If you manage a Linux server, you need to keep track of which services are running, which are enabled to start at boot, and which have failed. The systemctl
command makes it easy to manage and inspect these services. Here’s how you can use it to list and review the services on your system.
What is systemctl?
systemctl
is the main command-line tool to interact with systemd
, the init system and service manager for many modern Linux distributions (like Ubuntu, Debian, CentOS, Fedora, and others). With systemctl
, you can start, stop, restart, enable, disable, and—crucially—list services.
List All Services
To see every service, whether active, inactive, running, or failed, use:
systemctl list-units --type=service
This command will show you a table with:
- UNIT (the service name),
- LOAD (if the service’s configuration was loaded),
- ACTIVE (the high-level status: active/inactive),
- SUB (more specific status),
- DESCRIPTION (a short explanation).
Example output:
UNIT LOAD ACTIVE SUB DESCRIPTION
ssh.service loaded active running OpenBSD Secure Shell server
cron.service loaded active running Regular background program processing daemon
apache2.service loaded active running The Apache HTTP Server
...
List Only Active Services
If you want a shorter list with just the services that are currently running:
systemctl list-units --type=service --state=running
List Enabled Services (Start at Boot)
To see which services are configured to start automatically at boot:
systemctl list-unit-files --type=service --state=enabled
This lists all enabled services—regardless of their current status.
List All Installed Service Unit Files
For a full inventory of every service file (enabled, disabled, static, etc.):
systemctl list-unit-files --type=service
This shows you every service recognized by systemd and how each one is set to behave.
Check the Status of a Specific Service
If you want details about just one service (for example, ssh):
systemctl status ssh
This command gives you the status, recent log messages, and whether the service is running or not.
Summary Table
Command | What It Shows |
---|---|
systemctl list-units --type=service | All loaded services (active, inactive, etc.) |
systemctl list-units --type=service --state=running | Only running services |
systemctl list-unit-files --type=service --state=enabled | Services enabled at boot |
systemctl list-unit-files --type=service | All service unit files and their status |
systemctl status [service-name] | Details for a specific service |
Final Tips
- You need to run these commands as a regular user for viewing. For starting or stopping services, use
sudo
. systemctl
is available on most Linux systems that use systemd (check withsystemctl --version
if unsure).- Mastering
systemctl
is essential for any Linux admin or power user.
Have questions or want to see more Linux tips? Drop a comment below!
Tech enthusiast and content creator passionate about making technology simple for everyone. I share practical tips, guides, and reviews on the latest in computers, software, and gadgets. Let’s explore the digital world together!