systemd-analyze produces reports on boot time, per-unit boot time charts,
dependency graphs, and more

Start and stop services

Similar to the System V service command,
systemctl provides commands to start/stop/restart/reload units or services:

start: starts a unit if it is not already started

stop: stops a unit

restart: starts or restarts a unit

reload: tell a unit to reload its configuration (if it supports it)

try-restart: restarts a unit only if it is already active, otherwise do nothing, to prevent accidentally starting a service

reload-or-restart: tell a unit to reload its configuration if supported, otherwise restart it

try-reload-or-restart: tell a unit to reload its configuration if supported, otherwise restart it. If the unit is not already active, do nothing to prevent accidentally starting a service.

Changing global system state

systemctl has halt, poweroff, reboot, suspend, hibernate, and
hybrid-sleep commands to tell systemd to reboot, power off, suspend and so
on. kexec and switch-root also work.

The rescue and emergency commands switch the system to rescue and emergency
mode (see man systemd.special.
systemctl default switches to the default mode, which also happens when
exiting the rescue or emergency shell.

Run services at boot

systemd does not implement runlevels, and services start at boot based on their
dependencies.

To start a service at boot, you add to its .service file a WantedBy=
dependency on a well-known .target unit.

At boot, systemd brings up the whole chain of dependency started from a default
unit, and that will eventually activate also your service.

See systemctl get-default for what unit is currently the default in your
system. You can change it via the systemd.unit=kernel command line,
so you can configure multiple entries in the boot loader that boot the system
running different services. For example systemd.unit=rescue.target for a
rescue mode, systemd.unit=multi-user.target for a non-graphical mode, or add
your own .target file to implement new system modes.

See systemctl list-units -t target --all for a list of all currently
available targets in your system.

systemctl enable unitname enables the unit to start at boot, by creating
symlinks to it in the .wants directory of the units listed in its
WantedBy= configuration

systemctl disable unitname removes the symlinks created by enable

systemctl reenable unitname removes and readds the symlinks for when you
changed WantedBy=

Notes:
systemctl start activates a unit right now, but does not automatically
enable it at boot
systemctl enable enables a unit at boot, but does not automatically start
it right now
* a disabled unit can still be activated if another unit depends on it

To disable a unit so that it will never get started even if another unit
depends on it, use systemctl mask unitname. Use systemctl unmask unitname
to undo the masking.