Linux command
systemctl-cat 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Example
systemctl cat [unit]
Example
systemctl cat [unit1 unit2 ...]
Example
systemctl cat [template@]
Example
systemctl cat [unit] --user
说明
systemctl cat displays the full contents of unit files as systemd sees them, including the main unit file and any drop-in override files. It shows the absolute path of each file before its contents. This is useful for debugging unit configuration, especially when drop-in files in `.d/` directories modify the base unit.
参数
- --user
- Query the calling user's systemd --user manager instead of the system manager.
- --system
- Query the system manager (default).
- --no-pager
- Do not pipe output through a pager.
- --root=_PATH_
- Read unit files from an alternate filesystem root (useful for inspecting a chroot or mounted image).
- --image=_PATH_
- Read unit files from a disk image file at _PATH_.
- -M, --machine=_NAME_
- Operate on the systemd manager inside the named container or VM.
- -l, --full
- Do not ellipsize displayed paths.
FAQ
What is the systemctl-cat command used for?
systemctl cat displays the full contents of unit files as systemd sees them, including the main unit file and any drop-in override files. It shows the absolute path of each file before its contents. This is useful for debugging unit configuration, especially when drop-in files in `.d/` directories modify the base unit.
How do I run a basic systemctl-cat example?
Run `systemctl cat [unit]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --user do in systemctl-cat?
Query the calling user's systemd --user manager instead of the system manager.