W3cubDocs

/Nushell

ps for system

View information about system processes.

Signature

> ps {flags}

Flags

  • --long, -l: list all available columns for each entry

Input/output types:

input output
nothing table

Examples

List the system processes

>ps

List the top 5 system processes with the highest memory usage

>ps|sort-bymem|last5

List the top 3 system processes with the highest CPU usage

>ps|sort-bycpu|last3

List the system processes with 'nu' in their names

>ps|wherename=~'nu'

Get the parent process id of the current nu process

>ps|wherepid==$nu.pid|getppid

Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/ps.html