WebMail
WebMail

ps/kill


Example

lager 1:11pm {0}[~] ps

PID TTY STAT TIME COMMAND

25459 p6 S 0:00 /bin/login -h ISERVER.INAC.GC.CA -p

25485 p6 S 0:00 -tcsh

25578 p6 R 0:00 ps

lager 1:11pm {0}[~] lynx &

[1] 25582

lager 1:11pm {0}[~]

[1] + Suspended (tty output) lynx

lager 1:11pm {0}[~] ps

PID TTY STAT TIME COMMAND

25459 p6 S 0:00 /bin/login -h ISERVER.INAC.GC.CA -p

25485 p6 S 0:00 -tcsh

25582 p6 T 0:00 lynx

25600 p6 R 0:00 ps

lager 1:11pm {0}[~] exit

There are suspended jobs.

lager 1:12pm {1}[~] kill -9 25582

[1] Killed lynx

lager 1:12pm {0}[~]

xplanation

The first command "ps" showed up the processes that were running. They were a login program, a tcsh(this is a shell) and "ps" was also a process.

The "lynx &" command was used to run the program "lynx"(internet browser) in the background. In Windows 95 this would be the equivalent of minimizing a window. To bring this program out of the background and into the foreground we use the command "fg". To suspend a job hit "ctrl Z".

The second "ps" command tells us what processes are running. Notice that the "lynx" program is one of the processes. The number on the far left hand side is called a Process ID.

The command "exit" is meant to logoff. This cannot be done at this time because you can't log off with jobs in the background.

The command "kill -9 25582" Kills the lynx process because it has the process ID number. Killing a process is equivalent to closing a window in Win95 or 3.11. To kill all your processes you can type "kill -9 -1" this will log you off because it will also kill the process of your shell.