Units:

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:

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:


Setting the default target:


We set the default target to graphical.target.

Listing Targets:


Unit files are configuration files that define the different units in systemd.
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".

Isolating Targets:

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:


Taget_name could be basic.target for example.
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.

Brando Sabatini and Ikbal C ©. Powered by Blogger.