The basics
Linux services are background processes that run on a Linux system to perform specific tasks. They are similar to Windows services or daemons on macOS.
Most non-containerized Linux environments use systemd
to manage services. The two tools you’ll use to interact with systemd
are:
systemctl
: Controls services (called ‘units’ insystemd
nomenclature)journalctl
: Lets you work with system logs
We’ll cover systemctl
in this chapter, and journalctl
in Chapter 16, Monitoring Application Logs, later in the book.
systemd
is a system and service manager for Linux that provides a standard way to manage services. It is now widely used as the default init system for most Linux distributions. Many Linux distributions previously made use of the SysV init systems, which come from Unix and are still used by many modern Unix operating systems. Others, such as Alpine and Gentoo Linux, use OpenRC as their init systems. There are...