Jobs/Processes and killing them
When an application in Linux is launched, and i mean any application, process number is assigned to it. When you want to kill one, number-based or name-based killing is possible. Obviously killing is required only for ’stuck’ applications, normal exiting is the preferred way.
- In order to kill a process with known id (number):
- In order to kill a process with known name, use:
kill [-9] process_number
if ‘-9′ is used it’s a unfriendly kill, will kill stuck jobs also
pkill [-9] partial_name
Note that it’s dangerous since partial_name can be a part of the name, i.e. “pkill r” - will kill all jobs with ‘r’ in name.
There’s also
pgrep [-l] partial_name
which will display all the matching process numbers, ‘-l’ (which comes from “-long”) will display the name also.
Conventions:
[foo] - optional

