Linux 101 : Systemd (Targets)
Systemd is an init system, it is in charge of starting resources on the system.
Units in a systemd represent system resources like sockets, services, mounts, devices,targets,...
Targets represent system states, much like runlevels where each targets represents a different groups of units.
In each specific target only certain units are available available.
displaying the Default Target:
Target is a type of units, we have also other types like: device, service, socket,..
Multiple targets can coexist at the same time, so we can have a combination of different targets being active at the same time.
To list the units of type "target".
Isolation consist in starting the units belonging to a certain target and all its dependencies and stop the rest (like changing runlevels in System V style initialization).
To list all the dependencies of a target unit, we use the below command:
If we are fine with the units that will be kept, we can isolate the target.
Start the unit specified for the target_name for example: (basic.target) and its dependencies and stop all others.
basic.target constitutes a basic system with limited amount of units.