next up previous
Next: Finding out what's running: Up: Introduction to the Linux Previous: Background processes (fg and

Finding out what's running: ps

With all the our background processes going on as well as Linux's own programs and services it can be difficult to keep track of things. We can use the ps command to find out what processes we've started from the current terminal.

[pjh503@bhuna Linux]$ ps
  PID TTY          TIME CMD
 2150 pts/1    00:00:00 tcsh
 2216 pts/1    00:00:05 emacs
 2278 pts/1    00:00:00 ps

Notice that there are four columns of information given. The last column is fairly self-explanatory, it's just the command that's running. Notice that ps itself appears here, because it was running at the time it looked at the processes!

The entry in the first column is a number unique to each process, and is called the process identifier or PID. The next column tells you which terminal the process was started from, and since by default it only lists processes started from the current terminal window it's hardly surprising they all have the same entry. The third column tells you how much computer time each process has used.

You can find out all the processes a particular user is running on your machine using ps -u pjh503 where `pjh503' is the user name you want to enquire about.


next up previous
Next: Finding out what's running: Up: Introduction to the Linux Previous: Background processes (fg and
Phil Hasnip 2007-08-23