Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Sometimes programs tell me I can't start it because there is already another instance of it running. Best example would be Firefox and Chromium, but this problem accounts for many applications.

I cannot find the applications PID in the running processes.

How to kill all running instances of a program, e.g. Firefox?

I tried:

ps ax | grep firefox

But everything I can find is:

8193 ?        Rl     0:08 /usr/lib/firefox/firefox

I tried:

kill 8193

But I get:

Process not found

Actually, even when Firefox is running accurately, I cannot find its instances in ps.

What did I miss?

share|improve this question
With killall firefox you will kill it. – Uri Herrera Jan 10 '13 at 19:47
and add a -9 if that doesn't work – Gerhard Burger Jan 11 '13 at 12:41
up vote 14 down vote accepted

The easiest solution for a program that is not responding would be:

killall -9 firefox

For other killall options, see this article on Wikipedia: Link

share|improve this answer

Check if this works

kill -9 `ps -e | grep firefox | cut -b1-6`
share|improve this answer
So ps -e | grep firefox shows me the right process, interesting! – mcbetz Jan 10 '13 at 19:51
actually, pidof is much easier than this. pidof firefox will get you the right proces immediately. So the the solution could be kill -9 $(pidof firefox). ( the use of backticks (`) is depracated). But I prefer Uri Herrera's solution killall -9 firefox which should do exactly the same. – Gerhard Burger Jan 11 '13 at 12:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.