Hot answers tagged

83

To kill all the processes that you have the permission to kill, simply run the command kill -15 -1 or kill -9 -1 depending on the desired behavior (use man kill for details) To kill a specific process, say, firefox, simply run pkill firefox or killall firefox depending on the behavior you want: What's the difference between 'killall' and ...


72

The syntax is kill SIGNAL PID. The -9 option specifies that the SIGKILL signal should be sent (immediately terminate the target process(es), and specifying the PID -1 is shorthand for "all processes except itself and init". Since you don't use sudo (and presumably don't have root permissions), this immediately kills all processes you have permission to ...


52

There is an even simpler solution than the one of qbi: killall let's you kill processes by name, and you can specify signals. killall -9 middleman See man killall for more information and extra options (there are quite a few). As the name suggests, this does send the signal to all processes named middleman. But that's not different from other ways (like ...


49

From your output we see a "defunct", which means the process has either completed its task or has been corrupted or killed, but its child processes are still running or these parent process is monitoring its child process. To kill this kind of process kill -9 PID don't work, you can try to kill with this command but it will show this again and again. ...


44

Not quite like CtrlAltDel of Windows, but you can also kill with xkill. Just go to the "run" dialog (Alt+F2), type in xkill and your mouse pointer will change to an "x". Point on the application that you want to kill and click, and it'll be killed. Can sometimes be much quicker than loading the System Monitor.


41

1. `killall` already nice (SIGTERM) killall by default sends SIGTERM. This is already the nice approach that leaves applications the chance to clean up after themselves. The "go die already, right now!" approach is to send a SIGKILL signal, which requires specifying that as an option to killall. From The GNU C Library: Termination Signals: Macro: int ...


32

I don't thing zombie process is much of a headache. A zombie process does not take up any resources. It is just that it has it's entry in the process table. A Zombie process is not an orphan process, it does have a parent. kill, skill pkill will not work since the process is already killed, just that it's entry has not been removed. Zombie process can be ...


28

You can use your shell to do this task for you: kill -9 $(pidof middleman) The shell executes the command pidof middleman first. The output of pidof(8) is the process id. So the shell substitutes the pidof-command with the process id and executes kill -9 18845 (or whatever the correct process id is).


27

try man kill to get an explanation of the kill command.. it says: A PID of -1 is special; it indicates all processes except the kill process itself and init. and EXAMPLES kill -9 -1 Kill all processes you can kill. I hope you understand why your computer will log you out, when you end all processes. You quitted ...


27

If you want to kill all processes that are named java you can use following command: killall -9 java This command sends signals to processes identified by their name.


26

In System->Admin you have an application called System Monitor, this is the equivalent of the windows task manager. Edit: for later versions of Ubuntu (writing this on a PC running 13.10), you will find the system monitor through the dash (top left). Just type system monitor or parts of it in the dash and look for the System Monitor application..


22

I have a .desktop file that I use to kill the notifications. [Desktop Entry] Name=Notify Kill Comment=Kill those pesky notifications! Exec=killall notify-osd Icon=utilities-terminal Type=Application StartupNotify=true OnlyShowIn=GNOME;Unity; Toss that as notify-kill.desktop in ~/.local/share/applications, wait a minute and it will pop up in your Unity ...


20

Press ALT+F2, type xkill. The mouse pointer on screen will change to a cross. Then with it, you can simply click on the window you want to close.


20

Manual page ps(1) says: Processes marked <defunct> are dead processes (so-called "zombies") that remain because their parent has not destroyed them properly. These processes will be destroyed by init(8) if the parent process exits. You can't kill it because it is already dead. The only thing left is an entry in the process table: On ...


20

I only tested this on 13.10+, but you could do the following on the terminal type: sudo dpkg-reconfigure keyboard-configuration This will open the keyboard configuration script. Press enter 5 times if you don't want to change any keyboard configuration and only want to kill X. When you get to the Kill X option which looks like this: Select YES and ...


17

Try to switch to a different workspace Ctrl+Alt+one of you arrow keys, unless your system is completely frozen it should be able to switch workspaces In the new workspace look for System Monitor in the dash, it is like Windows Taskmanager. you should then be able to "kill" the process by right clicking on it. If this doesn't work you can restart your ...


16

Use sudo kill <pid> or sudo killall <process-name>


14

A few more pipes will get you where you want to be. Here's how I'd do it: search_terms='whatever will help find the specific process' kill $(ps aux | grep "$search_terms" | grep -v 'grep' | awk '{print $2}') Here's what's happening: grep -v 'grep' excludes the grep process from the the results. awk '{print $2}' prints only the 2nd column of the output ...


14

The other answers are entirely correct, but I might as well add a third option so all are documented here. You can also use: pkill -9 middleman See man pkill for more information and extra options. It doesn't really matter which of these methods you use. They will all work. But knowing the options if useful if you want to modify the behaviour in some ...


13

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


12

You could create a keyboard shortcut for xkill. Type keyboard in the Unity Dash and click the icon. Select the shortcuts tab. There, scroll down to the custom shortcuts section and click on the + button Now name your shortcut something and let the command be xkill and then click ok. Finally click on the xkill shortcut and press the desired key-combo to ...


12

Let's try something more: sudo apt-get install htop The top command is the traditional way to view your system’s resource usage and see the processes that are taking up the most system resources. Top displays a list of processes, with the ones using the most CPU at the top. htop displays the same information with an easier-to-understand layout. It ...


11

This is my "linux emergency cheat sheet": 1. Non responsive application SUPER --> type in System Monitor --> RETURN --> find process --> right click --> Kill Process or ALT + F2 --> type in xkill --> x marks the spot (or in this case frozen app) or CTRL + ALT + T --> type in top --> find process ID --> k PID where PID = process ID Effect: This kills ...


11

My favorite way to do that is Ctrl+Alt+F1 Then when you're logged back in run ps aux | grep program keep in mind that program should be replaced with the filename of the executable. In your case ps aux | grep wine, then you should see something like this: david 1234 0.0 0.0 1595676 2700 ? Sl 16:12 0:00 wine cmd.exe Where it says cmd.exe ...


11

From the man page for killall killall sends a signal to all processes running any of the specified commands. If no signal name is specified, SIGTERM is sent. When you do a kill -9, you are sending the SIGKILL signal. If you want to send a SIGKILL with killall, you need to do killall -s SIGKILL <PROCESSNAME> A good explanation of the ...


10

pkill -9 -f middleman The -f option makes it match the complete command line, rather than only the process name. Note that -9 should be a last resort signal, not something to use routinely.


10

From the pkill manpage: The process name used for matching is limited to the 15 characters present in the output of /proc/pid/stat. Use the -f option to match against the complete command line, /proc/pid/cmdline. So try pkill -1 -f PirateRadio.py


9

Using kill on the process itself is indeed ineffective, as the process is already dead; kill brings a live process to zombie state. The parent process is responsible for picking up the exit code of the process; the process remains a zombie until this is done. The init process will pick up the exit code of any process and throw it away, so it is the ...


9

fuser can do that: sudo fuser -KILL -k -n tcp 8088


9

kill doesn’t seem to read PIDs from STDIN (which is fed when you pipe the output of pidof to it). This should work: kill $(pidof name) For less typing you can also use the following (as suggested by @florian-diesch in the comments): pkill name



Only top voted, non community-wiki answers of a minimum length are eligible