commands.sh

systemctl whoami

linux

Show units that processes belong to. If no PID is specified, shows the unit the `systemctl` command itself is invoked in.

More info →

Examples (4)

Show the unit of the current shell (where `systemctl` is running)

Show the unit of the current shell in user service manager (services managed for your login session)

Show the unit a specific process belongs to

Show the units for multiple processes

systemctl whoami pid1 pid2 ...
made by @shridhargupta | data from tldr-pages