systemctl whoami
Show units that processes belong to. If no PID is specified, shows the unit the
systemctlcommand itself is invoked in. More information: https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#whoami [PID…].
- Show the unit of the current shell (where
systemctlis running):
systemctl whoami
- Show the unit of the current shell in user service manager (services managed for your login session):
systemctl whoami --user
- Show the unit a specific process belongs to:
systemctl whoami
- Show the units for multiple processes:
systemctl whoami
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
