Home

listunitfiles

Listunitfiles is a subcommand of the systemd systemctl utility. It reports the unit files installed on a system and shows how they are configured to start or be available, by listing each unit file with its enablement state. The typical syntax is systemctl list-unit-files [OPTIONS] [PATTERN...].

The command outputs a two-column list: UNIT FILE and STATE. UNIT FILE shows the name of the

Scope and behavior: list-unit-files scans the standard systemd unit directories, typically including /etc/systemd/system, /usr/lib/systemd/system, and /lib/systemd/system,

Usage notes: systemctl list-unit-files is useful for auditing startup configuration and verifying which units will be

unit
file,
such
as
ssh.service
or
cups.service.
STATE
indicates
how
the
unit
is
treated
by
systemd,
with
common
values
including
enabled,
disabled,
and
static.
Other
states
such
as
generated
or
indirect
may
appear
for
certain
types
of
units.
The
primary
purpose
is
to
reveal
how
units
are
configured
to
participate
in
boot
or
activation,
rather
than
their
current
runtime
status.
to
present
the
available
unit
files
and
their
configured
state.
It
does
not
reflect
the
unit’s
running
state
or
recent
activity;
it
reports
install-time
and
enablement
configuration.
The
output
can
be
filtered
by
type
(for
example,
with
--type=service
to
show
only
service
units)
or
by
state
(for
example,
--state=enabled
to
show
units
currently
enabled
for
startup).
started
automatically.
It
is
often
used
in
maintenance
scripts
and
during
system
hardening
to
understand
unit
enablement
across
service
types.
Examples
include
listing
all
service
unit
files,
or
showing
only
enabled
units.
See
systemctl
and
unit
files
for
related
concepts.