How to kill a proccess?

C

carbon333

Guest
You can do this by typing:

killall name

in the terminal. 'name' is the name of the procces to be killed.
 


Or you can use # kill -9 process ID
-9 is special kill signal, which will kill the process (Linux command, not UNX)
 
identify the process id by issuing #top command
and then # kill -9 [processID]

This is how i do it when mu computer hangs due to openshot. I just move to the terminal and then kill some running programs.
 
That's wrong. killall/kill will send a TERM signal to the program. This will ask the program to close itself. Kill is more a "signal singer", who is sending system signals to the programs. To "kill" a program you have to use the -9 option what is the real killer.

You can use kill also to get a status of a program. For example dd. It will not print any status or progress till it's done. With kill -USR2 $DDPID you get a status out.

HowTos are nice, but only when you explain what is happing. Details like this are important.

so far
4k3nd0
 
I will work this while I have this window open to follow these instructions well.thank you.
 
But why even use "kill" instead of "killall" if you don't know the ID? Why check it first? killall was written so you don't have to to this!
 
pkill works with the name, like killall. But you should recognize the problem with killall/pkill. It's a system wide killer, this is a problem on multi-user system. When other users use the same tool/program and your killing it that way away.

so far
akendo
 
Let's say you gotta kill the apache daemon?

This is what I do

ps aux | grep apache | cut -d ' ' -f 1 | xargs kill -9

That'll do it

Right?? XD
 
Let's say you gotta kill the apache daemon?

How about these:
Code:
service httpd stop
systemctl stop httpd.service
rc.d stop httpd

BTW, -9 is the same as -KILL. I had to run the command kill -l to find out what 9 is.
 
That's nice, but your about to lose a bit of the topic. Sure KenJackson, that is a "way" of doing it. But that's confusing, what system do you running on?
 
Sure KenJackson, that is a "way" of doing it. But that's confusing, what system do you running on?

The first one was the old way on Fedora (and I think Red Hat and CentOS, and probably PCLinuxOS and others), and it still works.

The second one is the new way on those same systems, and probably on more.

The third one is Arch (at least it should be right--I don't actually run an apache server on Arch).

The point is that there is a more correct way to shutdown a server. Killing is always a last resort--even on a computer.
 
I think killing a process should be quite similar to how it is done on Windows. Whatever opens up your Task Manager should include Processes, in which you can easily disable a process if needed.
 
I think killing a process should be quite similar to how it is done on Windows. Whatever opens up your Task Manager should include Processes, in which you can easily disable a process if needed.

Not everything is running a gui. I know the two servers that I run at home don't even have a gui installed.
 
Check the process list first by issuing the following command:

Code:
$ ps x

Then look for the process identifier (PID) of the program you want to kill, then type:

Code:
$ kill -9 [PID]

That's what they taught me ever since and that's what I always use.
The -9 will ensure "execution" of your command.
 
Check the process list first by issuing the following command:

Code:
$ ps x

Then look for the process identifier (PID) of the program you want to kill, then type:

Code:
$ kill -9 [PID]

That's what they taught me ever since and that's what I always use.
The -9 will ensure "execution" of your command.

Very helpful. Thanks. I suppose this is the dos version of windows?
 
Step #1: First, you need to find out process PID (process id),Use ps command or pidof command to find out process ID (PID). Syntax ps aux | grep processname pidof processname. Step #2Above command tell you PID of lighttpd process. Now kill process using this PID.
 
I usually search for the process and it's PID before i attempt to kill or terminate it. Well i use grep to see if the process is running

Code:
ps aux | grep kloxo

then find it's process id

Code:
pidof kloxo
and kill it using

kill pid
 

Members online


Top