Skip to content
shellmap

psList a snapshot of currently running processes across all 5 shells

Equivalents in every shell

Bashunix
ps aux
Zshunix
ps aux
Fishunix
ps aux
PowerShellwindows
Get-Process

Aliased as `ps` and `gps`. Unix `ps` flags (`aux`, `-ef`) will error — PowerShell `ps` is a different cmdlet, not the GNU binary.

cmd.exewindows
tasklist

Add `/v` for verbose (window title, user), `/svc` to list services per PID, `/fo csv` for machine-parseable output.

Worked examples

Find a process by name

Bash
ps aux | grep [n]ode
PowerShell
Get-Process node
cmd.exe
tasklist /fi "imagename eq node.exe"

Show PID, parent PID, and full command line

Bash
ps -eo pid,ppid,cmd
PowerShell
Get-CimInstance Win32_Process | Select-Object ProcessId, ParentProcessId, CommandLine
cmd.exe
wmic process get processid,parentprocessid,commandline

Top 10 processes by memory

Bash
ps aux --sort=-%mem | head -n 11
PowerShell
Get-Process | Sort-Object WorkingSet64 -Desc | Select-Object -First 10

Gotchas

  • BSD-style (`ps aux`) and System V-style (`ps -ef`) flags both work on Linux, but only BSD-style works on macOS without `-A`. Pick the one your scripts target.
  • PowerShell `ps` is an alias for `Get-Process` — running `ps aux` inside PowerShell errors. Either use `Get-Process` directly or shell out: `bash -c "ps aux"`.
  • `tasklist` does not show parent PID. Use `Get-CimInstance Win32_Process` (or `wmic`, which Microsoft removed from default Windows 11 24H2 installs) when you need the process tree.
  • Memory columns differ by tool: `ps` `RSS` is resident set in KB; `Get-Process` `WS` (WorkingSet) is bytes; `tasklist` "Mem Usage" is KB with thousands separators — don’t compare across tools without converting.

WSL & PowerShell Core notes

pwsh`ps` is the alias for `Get-Process` on every PowerShell Core platform — but it returns objects, not the text columns Unix `ps` prints. On Linux/macOS pwsh the system `/bin/ps` is also in PATH; quote the call (`/bin/ps aux`) when you specifically want the Unix tool.
WSL`ps aux` inside WSL only shows Linux processes. Windows processes appear only via `tasklist.exe` or `pwsh.exe -c "Get-Process"` through interop. Equally, Windows-side `tasklist` cannot see WSL-internal PIDs — they live inside the `vmmem` host.

Related glossary

Common tasks using ps

Related commands