ps

The command that lists running processes with details such as process ID, CPU use and command name.

In more detail

ps aux shows every process on the machine, and -o chooses columns, as in ps -eo pid,pcpu,comm. ps -p $$ -o comm= prints the name of the program running your current shell.

Example

ps -eo pid,pcpu,comm | sort -k2 -nr | head -n 3

Related terms

Taught in

References

Certification courses