Linux command
systemctl-list-dependencies 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Example
systemctl list-dependencies
Example
systemctl list-dependencies [unit]
Example
systemctl list-dependencies [unit] -a
Example
systemctl list-dependencies [unit] -t [service|socket|target|mount]
Example
systemctl list-dependencies [unit] --reverse
Example
systemctl list-dependencies [unit] --no-legend
说明
systemctl list-dependencies displays a unit's dependency tree in a hierarchical format. By default, it shows Requires and Wants dependencies. With `--all`, it includes all dependency types (After, Before, Conflicts, etc.). The `--reverse` option inverts the view, showing which units depend on the specified unit rather than what it depends on.
参数
- -a, --all
- Include all dependency types (not just Requires and Wants)
- -t, --type= _TYPE_
- Filter by unit type
- --reverse
- Show units that depend on this unit instead
- --no-legend
- Suppress header and footer (for scripts)
- --no-pager
- Disable pager
FAQ
What is the systemctl-list-dependencies command used for?
systemctl list-dependencies displays a unit's dependency tree in a hierarchical format. By default, it shows Requires and Wants dependencies. With `--all`, it includes all dependency types (After, Before, Conflicts, etc.). The `--reverse` option inverts the view, showing which units depend on the specified unit rather than what it depends on.
How do I run a basic systemctl-list-dependencies example?
Run `systemctl list-dependencies` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -a, --all do in systemctl-list-dependencies?
Include all dependency types (not just Requires and Wants)