O'Reilly logo

How Linux Works by Brian Ward

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Processes

A process is a running program. Each process on the system has a numeric process ID (PID). For a quick listing of the processes that you're running, just run the ps command on the command line. You should get a list like this:

  PID TTY STAT TIME COMMAND
  520  p0 S    0:00 -bash
  545   ? S    3:59 /usr/X11R6/bin/ctwm -W
  548   ? S    0:10 xclock -geometry -0-0
 2159  pd SW   0:00 /usr/bin/vi lib/addresses
31956  p3 R    0:00 ps

This is an abridged listing; yours will be much longer if you're running a windowing system. The fields are as follows:

  • PID The process ID.

  • TTY The terminal device where the process is running (don't worry about this for now).

  • STAT The process status; that is, what the process is doing at the given time and where its memory resides. For example, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required