In this tip we will see how to use the Ubuntu terminal to force close Google Chrome or Firefox. The commands will kill any running process for Google Chrome or Firefox, all running tabs will also be closed. We will also see how to add a 'Quit' button to the Unity launcher to close these web browsers from there. These commands will be useful especially when these web browsers become unresponsive.


You can force quit Firefox with all running tabs using the following command:

killall firefox

This command has also the same function, but it is a bit longer:

for i in $(ps x | grep firefox | cut -d"?" -f1 | grep -v firefox); do kill -9 $i ; done

Google Chrome

To kill all Google Chrome processes, run this command:

 killall chrome

or run this command:

for i in $(ps x | grep chrome | cut -d"?" -f1 | grep -v chrome); do kill -9 $i ; done


  • Adding A Firefox Quit Button To The Unity Launcher (Ubuntu 11.10)
Launch the terminal and run these commands:

wget http://dl.dropbox.com/u/47950494/Quit_Firefox.desktop.desktop

mv Quit_Firefox.desktop.desktop ~/.local/share/applications/

wget http://dl.dropbox.com/u/47950494/firefox-force-quit.jpg

sudo mv firefox-force-quit.jpg /usr/share/icons/hicolor/48x48/apps/

In the Unity dash search for "quit firefox" icon and drag and drop it in the Unity launcher:

  • Adding A Google Chrome Quit Button To The Unity Launcher (Ubuntu 11.10)

wget http://dl.dropbox.com/u/47950494/Quit_Chrome.desktop.desktop

mv Quit_Chrome.desktop.desktop ~/.local/share/applications/

wget http://dl.dropbox.com/u/47950494/quit-icon-chrome.png

sudo mv quit-icon-chrome.png /usr/share/icons/hicolor/48x48/apps/

Search now for "quit chrome" in the Unity dash and drag its icon and drop it in the Unity launcher:

That's it!

Post a Comment