Why does systemctl list-units show units as 'not-found'?
Why does systemctl list-units show units as 'not-found'?
Units may be shown as 'not-found' if they are listed as a target in another unit file, but are not available or unknown to systemd.
Systemd may show units, like services, as not-found in the LOAD column. Typically this is caused that these units are not available to systemd. There are a few causes for this to happen, such as being listed as a dependency for another unit. Typically units with the ’not-found’ state are not having an issue, especially if they are just a soft target for other units.
Example output
When filtering the output of the list-units subcommand on services, we can include the --all option to show them all.
# systemctl list-units --type=service --all
UNIT LOAD ACTIVE SUB DESCRIPTION
apparmor.service loaded active exited Load AppArmor profiles
apport-autoreport.service loaded inactive dead Process error reports when automatic reporting is enabled
apport.service loaded active exited LSB: automatic crash report generation
apt-daily-upgrade.service loaded inactive dead Daily apt upgrade and clean activities
apt-daily.service loaded inactive dead Daily apt download activities
● auditd.service not-found inactive dead auditd.service
auth-rpcgss-module.service loaded inactive dead Kernel Module supporting RPCSEC_GSS
In this case it is the auditd.service that could not be found. The reason is simple, auditd is not installed on the system. So why does systemd, and systemctl in particular, list it in the first place? That is because it is a target defined in the sshd.service.
After=network.target auditd.service