DistributedNetworks DistributedNetworks


Unix Commands  «Prev 

tee Command Review of Processes

To define a process, you must first understand the difference between a process and a program. A program is a file on disk. An example is the /bin/ls program you use to list files in the current directory. A program is a static entity that sits on the disk.
If you run a program, you create a process. In other words, a process is a running program. If five users run the ls command, they are creating five processes. A process is an active entity in the memory and CPU of your machine. UNIX assigns a unique number, called a PID number, to each process.

When you login to your shell account, UNIX starts a shell process for you. This shell program is printing the dollar sign prompt you see on the screen and runs your commands as you type them in. Use the ps command to see a list of the processes you are currently running on the system. You should see your shell listed in the output. Whenever you run a shell script, UNIX will create a new shell process with a new PID number.