Dreevoo.com | Online Learning and Knowledge Sharing
 
Home | Programs | Microsoft Windows | How to stop a program in Linux via command line
Guest
Click to view your profile
Topics
Programs
Languages
Recipes
Home
Shortcuts
 
 

How to stop a program in Linux via command line

When an application in Linux stops responding you can use the killall command to close the program unconditionally.

 
  Author: mat | Version: Ubuntu 12.04 | 1st September 2013 |  
 
 
1.
 

To see which programs/processes are currently running on your Linux box, use the following command:

ps ax

 
 
2.
 

In the list, find the program that refuses to respond

I will stop my web server which is called apache2.

 
 
3.
 

To stop/kill the program and all its corresponding processes  use the following Linux command:

killall ime_procesa

In my case:

killall apache2

 
 
4.
 

We can also kill a specific process, not the whole program

Again use command ps ax to have all the running processes listed, in the first row notice the process number.

 
 
5.
 

To kill that process use the following command:

kill -9 st_procesa

In my case:

kill -9 31599

There are a lot of different paramteres to the kill command, but if you want to kill the process unconditionally and right away, use the -9 parameter.

 
 
 
   
  Please login to post a comment
   
 
 
online learning made for people
Dreevoo.com | CONTRIBUTE | FORUM | INFO