mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-24 21:52:17 +00:00
Update cheatsheets
This commit is contained in:
26
tldr/linux/systemctl-whoami
Normal file
26
tldr/linux/systemctl-whoami
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# systemctl whoami
|
||||
|
||||
> Show units that processes belong to.
|
||||
> If no PID is specified, shows the unit the `systemctl` command itself is invoked in.
|
||||
> More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#whoami%20%5BPID%E2%80%A6%5D>.
|
||||
|
||||
- Show the unit of the current shell (where `systemctl` is running):
|
||||
|
||||
`systemctl whoami`
|
||||
|
||||
- Show the unit of the current shell in user service manager (services managed for your login session):
|
||||
|
||||
`systemctl --user whoami`
|
||||
|
||||
- Show the unit a specific process belongs to:
|
||||
|
||||
`systemctl whoami {{pid}}`
|
||||
|
||||
- Show the units for multiple processes:
|
||||
|
||||
`systemctl whoami {{pid1 pid2 ...}}`
|
||||
Reference in New Issue
Block a user