Bash: List and kill a process

To list the processes you're running in the current terminal, type "ps".

Figure out which processes from the list you want to kill and select the process IDs (PIDs).

wnguyen@europa:~$ ps
  PID TTY          TIME CMD
22452 pts/16   00:00:00 bash
18595 pts/16   00:00:00 vim
18596 pts/16   00:00:00 vim
20490 pts/16   00:00:00 ps

wnguyen@europa:~$ kill -9 18595 18596

That will kill off both vim processes. Type ps again to make sure they're dead.

image
Dead like this.

 
Copyright © Twig's Tech Tips
Theme by BloggerThemes & TopWPThemes Sponsored by iBlogtoBlog