systemd unit types

There are 11 different unit types, the most common 3 of them:

  • targets: activated by different system state, it’s useful as a dependency, e.g. sleep.target:do something when system is going to sleep.

    Of course, we can use systemctl to list the units that dependant on a specific unit.

    systemctl list-dependencies graphical.target
    
  • services Processes that are controlled by systemd.

  • sockets Enables to open a socket without running a service, and only start the service onece there is traffic on the socket.