Services, also known as daemons, are background programs and scripts that provide essential functionalities, such as database services like MySQL, or web server capabilities (e.g., Tomcat).
As the number of services installed and running increases overtime, it can become challenging to keep track of all active applications. Understanding which services are configured to start automatically when your system boots can be invaluable, especially if you’ve experienced a slowdown in system performance. Unnecessary services running in the background can consume valuable system resources like RAM, swap space, and CPU cycles, reducing the resources available for essential applications. Disabling or preventing these non-essential services from launching at startup can significantly enhance system responsiveness by freeing up these resources.
This concise tutorial will guide you through the methods to display all Ubuntu services configured to start at boot, as well as how to manage them by starting and stopping services as needed.
Read: How to Access Recovery Mode in Ubuntu Linux 22.04
Several options are available for viewing the list of services configured to start at boot. Below, we will detail the most commonly employed tools for this purpose.
`systemctl` is the primary command-line management tool for `systemd`, the system and service manager in modern Linux distributions. It provides comprehensive control over system services and allows you to inspect the current system state.
To list all services along with their current statuses using `systemctl`, open your terminal and execute the command:
systemctl -at service systemctl list services
To specifically display only services that are currently active, use the following command:
systemctl -t service --state=active Linux list services – active only
Read: How to fix high memory usage in Ubuntu
To view services that are enabled to start at boot, execute the command below:
systemctl list-unit-files --state=enabled Alternatively, you can achieve the same result using the `grep` command to filter the output:
systemctl list-unit-files | grep enabled To display a list of all currently loaded service units, use the following command:
systemctl list-units --type service This command provides detailed information for each service unit, including its full name (UNIT), its loading status (LOAD), its high-level activation state (ACTIVE), its low-level activation state (SUB), and a brief description (DESCRIPTION).
By default, `systemctl list-units` only shows active units. To display all loaded units, regardless of their state, use the `–all` or `-a` options:
systemctl list-units --type service --all To identify services that are configured to start before a particular service, for example, `ssh.service`, use the following command:
systemctl list-dependencies --after ssh.service Services starting before ssh service
The output displays services that are ordered to start before the ‘ssh’ service, as shown in the image above.
To find services that are ordered to start after a specific service (again, using ‘ssh’ as an example), run the following command:
systemctl list-dependencies --before ssh.service The `service` command is another utility that allows you to manage daemons and other services in Linux, including starting, restarting, and stopping them. To get a list of all services using the `service` command, execute:
service --status-all Ubuntu list services using service command
To verify if a particular service is enabled to start at boot, you can use the following syntax:
systemctl is-enabled {service_name} systemctl is-enabled service_name.service In the example above, ‘ssh’ is the service name being checked.
To view the detailed status of a service, including its enabled state, you can use these commands:
systemctl status {service_name} systemctl status service_name.service Alternatively, you can utilize the following command to list unit files by service type and check their status:
systemctl list-unit-files --type service The following table explains the information columns for service units:
Courtesy: Redhat
Read: Network Configuration in Ubuntu
To enable a service to automatically start during system boot, use one of these commands:
sudo systemctl enable {service_name} sudo systemctl enable service_name.service Similar to enabling, `systemctl` can also disable a service from starting at boot using these commands:
sudo systemctl disable {service_name} sudo systemctl disable service_name.service Disabling a service prevents its service unit from automatically starting when the system boots.
This action reads the `[Install]` section of the service unit file and removes the symbolic links from `/etc/systemd/system/` and its subdirectories that point to `/usr/lib/systemd/system/name.service`. Furthermore, you can completely prevent a service unit from being started, either by other services or manually, by masking it. To mask a service, execute the following command as root:
systemctl mask name.service To stop an actively running service, use one of the following commands:
sudo systemctl stop {service_name} sudo systemctl stop service_name.service To start a service that is currently inactive, use one of these commands:
sudo systemctl start {service_name} sudo systemctl start service_name.service To restart a service that is already running:
sudo systemctl restart {service_name} sudo systemctl restart service_name.service To examine error messages and logs associated with a specific service, execute one of these commands:
journalctl -u {service_name} Alternatively:
journalctl -u service_name.service In `systemd`, service dependencies can be both positive and negative. A service might require other services to be running before it can start (positive dependency), or it might require certain services to be stopped (negative dependency). When you attempt to start a service, `systemd` automatically manages these dependencies without explicit user notification. If you try to start a service that has a negative dependency on a service that’s already running, `systemd` will automatically stop the first service. For instance, if ‘postfix’ is running and you try to start ‘sendmail’, `systemd` will first stop ‘postfix’ because these two services cannot operate simultaneously on the same port.
Credit : Redhat
The post How to Manage Ubuntu Boot Services: List, Start, and Stop Systemd Services at Startup appeared first on net2.
This article demonstrates how to harden security of VPS server and is intended for server…
In this blog post, we will guide you on how to install wget on Ubuntu…
Jan 27,2026 Xfwl4 - The roadmap for a Xfce Wayland Compositor We, the Xfce team…
This article provides a step-by-step how-to guide to deploy n8n on Ubuntu VPS. What is…
In July 2025, git received CVE-2025-48384, a high vulnerability allowing arbitrary code execution when cloning…
Last year, we collaborated with two design student teams from Loughborough University in the UK.…
View Comments