It is important to stop running programs using proper menu commands. Most of the programs you start will have a quit or exit option on one of their menus. Please note that most windows have an additional menu which also features a close option like the one shown below
Do not confuse this with the close option of an application. This will only close the window, not the application. The application may crash upon realizing it has no output window only available. Most software have routines to handle crashes like this, but some may not be able to handle this situtation properly. As a consequence, data loss may occur.
Occassionally programs in the background may keep on working, even though you are finished with them. This is a highly undesired situation as the program will continue using shared system resources. These programs must be terminated manually.
The "kill" command can be used to stop such processes (programs are seen as processes). Each process running on the computer has a unique process number that identifes it. A user can check on his/her active processes by using the
ps -u username
command. A typical output would be:
PID TTY TIME CMD 300 ? 3:24 Xsun 386 ? 0:00 Xsession 438 pts/2 0:00 tcsh 458 pts/2 0:01 xterm 563 pts/2 0:00 xterm
A "terminate" signal can be sent to any of these processes using:
kill Process ID E.g. kill 563
The above example would terminate the second "xterm" program from the above list. Not all programs will terminate gracefully, some need to be forced to do so. A harsher "kill" signal can be sent by using the
kill -9 Process ID
command. The "-9" option specifies the "-SIGKILL" signal which will forcefully terminate the program, use this as a last resort.
a production of
Cadence is a trademark of Cadence Design Systems, Inc., 555 River Oaks Parkway, San Jose, CA 95134.
Please read this DISCLAIMER