systemctl list-units
List units that systemd currently has in memory. See also:
systemctl list-unit-files. More information: https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#list-units PATTERN….
- List units which are active, have pending jobs, or have failed:
systemctl list-units
- List all units, including inactive ones:
systemctl list-units
- Filter by unit type:
systemctl list-units
- Filter by state:
systemctl list-units --state
- Filter by a name pattern:
systemctl list-units 'systemd*'
- Print output directly to
stdout:
systemctl list-units --no-pager
- Print output without headers or footers (for scripts):
systemctl list-units --no-legend
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
