The ps
program allows the user to see a snapshot of the processes running on the system. By using the appropriate parameters, the output can be changed to include more or less information. For this section we will run as root, and use the BSD style ps
. The options may be grouped, and no dash is used.
Carry out the following steps to run ps
:
Running just
ps
with no parameters will give something like the following output:Big4 /temp/linuxbook/chap6 # ps PID TTY TIME CMD 5197 pts/25 00:00:00 su 5218 pts/25 00:00:00 bash 17789 pts/25 00:00:00 ps
Since this is not very informative, let’s show every process that has a TTY:
ps a
Now, include the processes that don’t have a TTY:
ps ax
Display the output in a more user-oriented format:
ps aux
. Note the change in the header.If the lines are cut off at the end on your system, add the wide option using the following command:
ps auxw
There sure is a lot of output...