Linux Process Commands
Created: June 02, 2020
ps
- By default, it only lists processes attached to the current terminal.
ps auxlist all processes for all users on all terminalsa: lists ll user’s processes which are attached to a terminalu: display in user formatx: lists all the invoking user’s processes
f: shows processes in a tree view.
ps aux vs ps -aux
There is a difference between ps aux and ps -aux. ps -aux is the Unix variant and ps aux is
the BSD variant. From man ps:
“The POSIX and UNIX standards require that ps -aux print all
processes owned by a user named x, as well as printing all processes that would be selected by
the -a option. Modern Linux distributions might make ps -aux an alias of ps aux; nevertheless
this is intended to be a temporary fix.”
ps -aux should be avoided in favour of ps aux.
pgrep
pgrep PROCESSoutputs the PID ofPROCESS.-loutputs the name of thePROCESSin addition to the PID.-ulimits the matches to a user.-vinverts the results.
Kill Signals
- There are 64 kill signals.
kill -lwill list all kill signals.
pstree
A nice tree view.