What is systemctl on Linux

Using Systemd in practice

You should have already encountered the systemd daemon. If you want to use your computer as a server, for example as a NAS data server, you don't want to start the necessary service manually. Systemd ensures that you don't have to worry about it. Most of the time, the necessary entries are made in the system by the program itself during the installation. The makers of Ubuntu have favored their own Upstart solution for a long time, but Systemd has also been used here since version 15.04.

The basic commands of systemd

Like all services under Linux, systemd has a number of commands for control. To get an overview of which services are currently running, open a terminal and enter there

a. The tasks that Systemd performs are called units. Each unit must be described in a small configuration file. In addition to "Service", Systemd knows a whole range of different unit types: Automount, Device, Mount, Path, Scope, Slice, Snapshot, Socket, Swap and Timer. The distinction only plays a role if you want to create and set up your own units.

If you do not like to work on the console, you can also install a graphical user interface which you can use to get an overview of all available units. Thanks to the filter functions, you can also display the elements that are not loaded at all.

In Ubuntu, run the systemadm command in a terminal. If the software has not yet been installed, the system will notify you. Then just use the syntax shown to you to install the package. Then run systemadm again and the interface starts.

However, every user should be familiar with some of the systemd terminal commands in order, for example, to start or stop specific services:

systemctl start [name.service]
systemctl stop [name.service]
systemctl restart [name.service]
systemctl reload [name.service]
systemctl status [name.service]

"Reload" is recommended whenever you have changed the configuration of a service. You can use the "Status" parameter to determine whether the service is running correctly. The “timer” unit type is versatile. These are actions that should be carried out at regular intervals. Systemd thus competes with the better-known cron.