List Services in Linux: Ubuntu, Debian, Fedora & CentOS “systemctl”
Navigating the complex landscape of Linux distributions can be daunting, especially when it comes to managing and listing services. Linux…
List Services in Linux: Ubuntu, Debian, Fedora & CentOS “systemctl”
Navigating the complex landscape of Linux distributions can be daunting, especially when it comes to managing and listing services. Linux, the powerhouse behind countless servers worldwide, offers a variety of tools for service management. This guide embarks on a journey to explore these tools, providing you with the knowledge to master service management across different Linux environments.

Introduction to Service Management in Linux
Service management in Linux is an essential skill for any system administrator or IT professional. It involves checking and managing the services that run in the background of a Linux system. Services, the backbone of Linux systems, range from web servers like Apache and Nginx to file sharing services such as Samba and NFS. Understanding how to manage these services is crucial for ensuring system stability and security.
A Brief Background on “init” Systems
Linux has seen an evolution in the way services are managed, primarily through its init systems. The init system is the first process that starts when a Linux system boots up and is responsible for controlling startup, shutdown, and management of services. Initially, the System V (SysV) init system was widely used across many distributions. It was later supplemented and, in many cases, replaced by more advanced and flexible systems like Upstart and systemd.
Systemd, the most recent evolution in this lineage, has become the standard for many modern Linux distributions due to its efficiency, powerful capabilities, and comprehensive service management features. Systemd’s introduction brought about significant changes in how services are managed, making it easier to administer complex systems with dependencies between services.
As we delve into the world of service management, it’s essential to recognize the transition from traditional SysV init scripts to the more dynamic systemd units. This transition marks a significant shift in Linux administration, offering more granular control and insight into the system’s workings.
In this guide, we will primarily focus on ‘systemctl’, the command-line tool used to interact with the systemd system and service manager. Understanding ‘systemctl’ is key to managing services efficiently in systemd-based distributions. However, recognizing the role of the service command in SysV and Upstart systems remains valuable, especially when working across various Linux environments.
By the end of this journey, you will be equipped with the knowledge to list services in Linux, using both the ‘systemctl’ and ‘service’ commands. Whether you are managing a single server or an entire data center, mastering these tools is essential for successful Linux administration.
Advanced Service Management with ‘systemctl’
In the realm of Linux administration, mastering the ‘systemctl’ command is akin to wielding a powerful tool that simplifies the management of system and service states. As part of the systemd suite, ‘systemctl’ offers a unified interface to interact with the systemd system and service manager, marking a significant evolution from previous init systems. This section delves into the intricacies of ‘systemctl’, highlighting its capabilities and how it stands as a cornerstone for efficient service management in systemd-equipped Linux distributions.
‘systemctl’ for systemd Systems
Systemd, the default initialization system for many modern Linux distributions, brings forth ‘systemctl’ as its primary command-line utility. Unlike its predecessors, ‘systemctl’ integrates functionalities that cater to the dependencies between services, allowing for more sophisticated control and automation.
The adoption of systemd and ‘systemctl’ across major Linux distributions such as Ubuntu, Debian, CentOS, and Fedora underscores their significance in modern Linux environments. This widespread acceptance is due to ‘systemctl’’s comprehensive feature set, which includes, but is not limited to, managing system states, session management, and log viewing.
Detailed Usage of ‘systemctl’ to List Services and Manage States
‘systemctl’ shines in its ability to list and manage services with precision and clarity. Using ‘systemctl’, administrators can easily query the status of all services, individual services, or even services matching specific criteria. For instance, the command ‘systemctl list-units — type=service’ displays all active services, offering a snapshot of the system’s operational status.
Beyond listing services, ‘systemctl’ provides a suite of commands for managing the lifecycle of services:
- Start a Service:
systemctl start <service_name>
- Stop a Service:
systemctl stop <service_name>
- Restart a Service:
systemctl restart <service_name>
- Enable a Service:
systemctl enable <service_name>
- Disable a Service:
systemctl disable <service_name>
- Check Service Status:
systemctl status <service_name>
This suite of commands encapsulates the essence of service management, offering administrators the ability to maintain control over the system’s operational landscape with ease.
Differences in Output and Capabilities between service and ‘systemctl’
While ‘systemctl’ is the standard tool for systemd-based systems, the older ‘service’ command remains in use for backward compatibility and in distributions not yet adopting systemd. A key difference between the two lies in their output and capabilities. ‘systemctl’ provides a more detailed output, offering insights into the unit’s status, logs, and dependencies. In contrast, service offers a simpler interface, focusing on basic start, stop, and status commands without the depth of information provided by ‘systemctl’.
As we continue to explore the landscape of Linux service management, the versatility and power of ‘systemctl’ become increasingly apparent. Its role in enabling efficient administration of services cannot be overstated, providing a foundation upon which the stability and security of Linux systems are built.
Distribution-Specific Commands: Linux ‘systemctl’
Linux’s diversity is one of its strengths, offering a variety of distributions tailored to different needs and preferences. However, this diversity also introduces complexity, especially when it comes to managing services across distributions. While ‘systemctl’ has become the standard for service management in many modern Linux systems, nuances in its implementation and additional tools provided by different distributions can impact day-to-day administration tasks. This section highlights the unique commands or options available in popular Linux distributions such as Ubuntu, Debian, CentOS, and Fedora, and how they affect service management.
Unique ‘systemctl’ Commands in Ubuntu and Debian
Ubuntu and Debian, two of the most popular distributions, primarily use ‘systemctl’ for service management. However, they also include utility scripts and commands that cater to specific needs or legacy systems. For instance, the ‘update-rc.d’ command in Debian and Ubuntu allows administrators to enable or disable services during the startup process, a throwback to the SysVinit scripts.
Despite these distributions’ move to systemd, understanding these unique commands remains essential for managing legacy systems or specific cases where alternative methods are preferred.
CentOS and Fedora: Systemd Pioneers
CentOS and Fedora were among the first distributions to adopt systemd, setting the stage for its widespread acceptance. As such, they offer a clean and consistent implementation of ‘systemctl’, with additional utilities like ‘journalctl’ for log management that complement service management tasks.
Fedora, known for staying at the forefront of Linux development, often introduces newer systemd features that might later appear in other distributions. Keeping abreast of these changes in Fedora can provide insights into future trends in Linux service management.
Command Variations Across Distributions
While the core ‘systemctl’ commands remain consistent across distributions, slight variations in syntax or additional options can exist. These differences often stem from the distribution’s specific configuration or the systemd version they employ. For example, newer versions of systemd introduce commands like ‘systemctl is-enabled <service_name>’ to check if a service is enabled, which might not be available in distributions running older versions.
Moreover, each distribution may offer unique systemd units or services, tailored to its environment. Understanding these distinctions is crucial for administrators tasked with managing services across different Linux environments.
Notable Differences in ‘systemctl’ and ‘service’ Commands
The transition from service to ‘systemctl’ commands in various distributions underscores the evolution of Linux service management. While both commands share similar functionalities, such as starting and stopping services, ‘systemctl’ commands often provide more detailed feedback and control over services. For example, ‘systemctl’ allows administrators to control services with granular precision, including masking services (preventing them from being started, even manually) or isolating system states, features not available with the service command.
Adapting to these differences requires familiarity with both ‘systemctl’ and ‘service’ commands, ensuring seamless service management regardless of the underlying system. Administrators should prioritize learning ‘systemctl’ due to its advanced capabilities and broader adoption but remain competent with service commands for environments still relying on legacy init systems.
The landscape of Linux distributions presents a rich tapestry of tools and commands for service management. As Linux continues to evolve, so too does the way in which services are managed across its many distributions. Embracing this diversity and understanding the unique aspects of each environment ensure that administrators can manage services effectively, regardless of the platform.
List Services in Linux: Practical Examples
This section offers hands-on guidance for using common commands to manage services across various Linux distributions.
Starting and Stopping Services
Use below commands to run and halt the Nginx service.
- Using ‘systemctl’:
systemctl start nginx.service
systemctl stop nginx.service
- Using ‘service’:
service nginx start
service nginx stop
Enabling and Disabling Services at Boot
Below commands ensure and prevents Nginx automatic start at boot respectively.
- Using ‘systemctl’:
systemctl enable nginx.service
systemctl disable nginx.service
- Using ‘service’:
The ‘service’ command itself does not directly support enabling or disabling services at boot. This functionality is managed through SysVinit scripts and the ‘chkconfig’ or ‘update-rc.d’ commands on systems without ‘systemctl’.
[On Red Hat based systems]
chkconfig nginx on
chkconfig nginx off
[On Debian based systems]
update-rc.d nginx defaults
update-rc.d nginx remove
Checking the Status of Services
To check the status of a service, use below commands.
- Using ‘systemctl’:
systemctl status nginx.service
- Using ‘service’:
service nginx status
Restarting and Reloading Services
Restart command is useful when updates to the service’s configuration require a complete restart. If the service supports reloading its configuration without a full restart, reload command will be handy.
- Using ‘systemctl’:
systemctl restart nginx.service
systemctl reload nginx.service
- Using ‘service’:
service nginx restart
service nginx reload
Troubleshooting Common Issues
Use this command to list all services that have failed to start or crashed. This command can quickly identify issues that might affect system stability or functionality.
systemctl --failed
For detailed troubleshooting, ‘journalctl’ allows administrators to view all log messages related to the Nginx service. This command is invaluable for diagnosing problems, understanding service behavior, and ensuring that services operate as expected.
journalctl -u nginx.service
Wrap Up
The widespread adoption of systemd and its associated ‘systemctl’ command represents a paradigm shift in how Linux services are managed. This transition offers administrators more granular control over services, enhanced status reporting, and improved system initialization processes. By embracing systemd, administrators can leverage its full suite of features to automate and streamline service management, enhancing system stability and efficiency.
As we conclude this guide, the importance of mastering service management commands for effective Linux server administration cannot be overstated. The ‘systemctl’ and ‘service’ commands are essential tools in an administrator’s arsenal, enabling the management of services that are vital to the operation of Linux systems. By understanding and applying the principles and examples outlined in this guide, administrators can ensure the health, security, and performance of their Linux servers, thereby supporting the critical applications and services that depend on them.
You can watch our guide on “listing the running services on Ubuntu” at our YouTube channel or read it here on our blog.
메타데이터
- post_id
- 5c06d008b01b
- slug
- list-services-linux-systemctl-5c06d008b01b
- url
- https://medium.com/cloudzy-blog/list-services-linux-systemctl-5c06d008b01b
- canonical_url
- https://medium.com/cloudzy-blog/list-services-linux-systemctl-5c06d008b01b
- author_url
- https://medium.com/@cloudzyvps
- status
- ok
- fetched_at
- 2026-09-12 10:22:26