How do i list systemd unit files by type?
maltiger last edited by maltiger
$ systemctl list-unit-files --type=service
You can also list units by type.
$ systemctl list-units --type=device
The type of units are:
The following unit types are available: 1. Service units, which start and control daemons and the processes they consist of. For details see systemd.service(5). 2. Socket units, which encapsulate local IPC or network sockets in the system, useful for socket-based activation. For details about socket units see systemd.socket(5), for details on socket-based activation and other forms of activation, see daemon(7).
3. Target units are useful to group units, or provide well-known synchronization points during boot-up, see systemd.target(5). 4. Device units expose kernel devices in systemd and may be used to implement device-based activation. For details see systemd.device(5). 5. Mount units control mount points in the file system, for details see systemd.mount(5).
6. Automount units provide automount capabilities, for on-demand mounting of file systems as well as parallelized boot-up. See systemd.automount(5). 7. Snapshot units can be used to temporarily save the state of the set of systemd units, which later may be restored by activating the saved snapshot unit. For more information see systemd.snapshot(5). 8. Timer units are useful for triggering activation of other units based on timers. You may find details in systemd.timer(5).
9. Swap units are very similar to mount units and encapsulate memory swap partitions or files of the operating system. They are described in systemd.swap(5). 10. Path units may be used to activate other services when file system objects change or are modified. See systemd.path(5). 11. Slice units may be used to group units which manage system processes (such as service and scope units) in a hierarchical tree for resource management purposes. See systemd.slice(5). 12. Scope units are similar to service units, but manage foreign processes instead of starting them as well. See systemd.scope(5). Units are named as their configuration files. Some units have special semantics. A detailed list is available in systemd.special(7).
© Lightnetics 2019