The jobs
command we were using earlier only lists processes
that were started from your bash session. To see all the processes on your
system, use ps
with the a
and x
options
together:
$ ps ax
PID TTY STAT TIME COMMAND
1 ? S 0:04 init [3]
2 ? SW 0:11 [keventd]
3 ? SWN 0:13 [ksoftirqd_CPU0]
4 ? SW 2:33 [kswapd]
5 ? SW 0:00 [bdflush]
We've listed only the first few because it's usually a very long list.
This gives you a snapshot of what the whole machine is doing, but it is a lot of
information to sift through. If you were to omit the ax
, you
would see only processes that are owned by you, and that have a controlling
terminal. The command ps x
would show you all your processes,
even those without a controlling terminal. If you were to use ps
a
, you would get the list of everybody's processes that are attached to
a terminal.