How to list processes?



It depends on which UNIX you are using...

"ps aux" would be the BSD syntax -- "a" for "all processes", "u" for "user format, "x" for lifting the "must have a tty" restriction

"ps -ef" would be the Unix98 syntax -- "-e" for selecting all processes, "-f" for full-format listing.

If I remember correctly : FreeBSD, OpenBSD, and NetBSD would support the BSD syntax only, while many other distributions would support both types of syntaxes.
 
Last edited:
To get information about all processes running on the system use ps -A.

The top command is, like ps, used to display running processes, but it updates its display every few seconds.

Source:
ps command
top command
 
Here's a way to get the top 10 CPU processes:
Code:
/bin/ps -eo pcpu,pid,user,args | sort -k 1 -r | head -10

And if you are looking for a specific process, this example uses apache.
Code:
ps aux | grep apache
 
Code:
ps ax
OR
Code:
top
But I use the first one more.
 

Members online


Top