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)
systemctl whoami --userShow the unit a specific process belongs to
systemctl whoami pidShow the units for multiple processes
systemctl whoami pid1 pid2 ...made by @shridhargupta | data from tldr-pages