Linux command
systemctl-list-unit-files 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Example
systemctl list-unit-files
Example
systemctl list-unit-files --state [enabled|disabled|static]
Example
systemctl list-unit-files -t [service|socket|timer]
Example
systemctl list-unit-files '[pattern*]'
Example
systemctl list-unit-files --no-pager
Example
systemctl list-unit-files --no-legend
说明
systemctl list-unit-files displays all installed unit files and their enablement states. Unlike `list-units` which shows runtime state, this shows the boot configuration for all available units. The output shows the unit file name and its state: enabled, disabled, static, masked, generated, transient, indirect, or alias.
参数
- --state= _STATE_
- Filter by enablement state (enabled, disabled, static, masked, etc.)
- -t, --type= _TYPE_
- Filter by unit type
- --no-pager
- Disable pager output
- --no-legend
- Suppress header and footer
FAQ
What is the systemctl-list-unit-files command used for?
systemctl list-unit-files displays all installed unit files and their enablement states. Unlike `list-units` which shows runtime state, this shows the boot configuration for all available units. The output shows the unit file name and its state: enabled, disabled, static, masked, generated, transient, indirect, or alias.
How do I run a basic systemctl-list-unit-files example?
Run `systemctl list-unit-files` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --state= _STATE_ do in systemctl-list-unit-files?
Filter by enablement state (enabled, disabled, static, masked, etc.)