A Linux systems provide a variety of system services (such as process management, login, syslog, cron, etc.) and network services (such as remote login, e-mail, printers, web hosting, data storage, file transfer, domain name resolution (using DNS), dynamic IP address assignment (using DHCP), and much more).
Technically, a service is a process or group of processes (commonly known as daemons) running continuously in the background, waiting for requests to come in (especially from clients).
Linux supports different ways to manage (start, stop, restart, enable auto-start at system boot, etc.) services, typically through a process or service manager. Most if not all modern Linux distributions now use the same process manager: systemd.
Read Also: The Story Behind ‘init’ and ‘systemd’: Why ‘init’ Needed to be Replaced with ‘systemd’ in Linux
Systemd is a system and service manager for Linux; a drop-in replacement for the init process, which is compatible with SysV and LSB init scripts and the systemctl command is the primary tool to manage systemd.
When you run the systemctl command without any arguments, it will display a list of all loaded systemd units (read the systemd documentation for more information about systemd units) including services, showing their status (whether active or not).
systemctl
To list all loaded services on your system (whether active; running, exited or failed, use the list-units subcommand and --type switch with a value of service.
systemctl list-units --type=service
And to list all loaded but active services, both running and those that have exited, you can add the --state option with a value of active, as follows.
systemctl list-units --type=service --state=active
To check service status
systemctl status service-name
To start service
systemctl start service-name
To stop service
systemctl stop service-name
To enable service
systemctl enable service-name
To disable service
systemctl disable service-name