kill - Send a specified signal to a process or process group.

learn more… | top users | synonyms

0
votes
3answers
999 views

Kill a nohup mpi process

I have started a program in parallel using the command: nohup mpirun -7 mylongprogram.py & I now want to terminate the program. When I want to kill the process by the command: kill -9 ...
7
votes
4answers
2k views

How to stop a bunch of processes on unix fast?

How to stop a bunch of processes on unix fast. I can use ps/top, kill. If the number of processes is very large, I use shell script. Are there other ways, only one or two unix commands can do it ...
1
vote
2answers
38 views

killing a process in one line

Sometimes I need to end a process quickly via terminal but it is tedious to just type ps -e | grep firefox and then kill all the time. I want to create an alias in my .bashrc and just type in ...
3
votes
1answer
24 views

Send process to background using PID

From this question I know you can resume a stopped process by doing kill -CONT $PID is there a kill option to resume a process but in the background (like bg but using a PID?)
8
votes
5answers
9k views

'kill java' doesn't kill java

I am running debian right now and sometimes I need to kill java manually from the terminal, but when I try kill #pid# or pkill java nothing happens. No console output (ok, that's normal) and java is ...
3
votes
2answers
29 views

How can I auto-close dropped SSH connections?

When I work on my server remotely, sometimes my SSH connections get dropped due to network issues. When I re-connect to my server, the dropped sessions remain open. I can see them when I run w. I'm ...
2
votes
4answers
2k views

I want to kill all processes that result from the following command

The following command will display all the PID's running for vmstat1: ps -ef | grep "vmstat 1" | awk '{ print $2 }' My question is, how do I kill them all, if there's like 20 of them at once?
0
votes
1answer
22 views

Why i couldn't kill the NOHUP process?

So in order to keep my simple blog running permanently, i used the NOHUP command. nohup python manage.py runserver 0.0.0.0:8000 Everything worked perfectly, my blog keep running even though i ...
4
votes
1answer
147 views

Stop a task based on output

I have a task that runs written in Mono, however sometimes (randomly) the Mono runtime will hang after the task is complete and just print: _wapi_handle_ref: Attempting to ref unused handle 0x2828 ...
1
vote
2answers
21 views

Preventing the accidental killing of wrong process in htop

I frequently use htop to kill certain processes. To find the process I usually execute "Search" via F3. However, the list of processes refreshes frequently, and in many occasions, before I could press ...
0
votes
0answers
28 views

System management locked out by zypper process; refuses to kill

I am attempting to run zypper install nmap on openSUSE Tumbleweed (KDE), but when I attempt to do so I see the following error: System management is locked by the application with pid 12063 (zypper). ...
0
votes
0answers
10 views

What is the difference between the SIGHUP generated by typing “exit” in the SSH shell terminal vs clicking the “X” button in the PuTTY window?

Referring to this question, I am trying to use nohup <command> <arg> & to continue to run a command in the background after I logout from the SSH shell terminal. However, the ...
20
votes
8answers
40k views

Kill many instances of a running process with one command

This is one of the questions that has troubled me often. Suppose I have thousand or more instances of any process(for e.g. say the process vi) running. How do I kill them all in one single shot/one ...
1
vote
3answers
28 views

What is a non-agressive way of killing a process? [duplicate]

I want to close a program through the command line (say Firefox or Thunderbird). The program is working just fine and in theory I could just go FILE > CLOSE. However, I want to do this through the ...
2
votes
2answers
61 views

What is happening after kill -CONT <PID>?

I have suspend a process through kill -TSTP <pid>. Then tried to continue it with kill -CONT <pid>. But After completion of process, control is not returning to bash. Why this is ...
1
vote
1answer
294 views

Why are --older-than and --younger-than killall options missing in RHEL/CentOS?

I've experienced this issue in cleaning up scripts written by developer who were writing for Ubuntu systems, as well as ServerFault questions like this. Is there any reason the -o, -y (--older-than ...
1
vote
0answers
23 views

Why do interrupted processes show up in nvidia-smi?

When ​I kill processes in terminal using C-c and run nvidia-smi, the process are still shown as "compute processes". These processes are no longer in the top resu​lts. I have to kill -9 to clean them ...
1
vote
1answer
46 views

What are these processes and why can't I kill them?

(On OS X 10.11.3) I'm having a problem starting a java process that needs to listen on port 8040. Getting a BindException. So seems like somebody else is already listening on it. A quick check ...
3
votes
1answer
35 views

Why can't I use `kill $!` with parameter expansion in Bash, when the most recent process is “notify-send”?

According to Bash: Special Parameters: ($!) Expands to the process ID of the job most recently placed into the background, whether executed as an asynchronous command or using the bg builtin I ...
1
vote
2answers
47 views

how to kill job in background?

I know how to kill a job with kill %(number) but is it possible to kill a job as background job, the question is "kill tail as a background job?"
-2
votes
5answers
58 views

How to find PID of an ongoing job in UNIX?

I executed a shell script which will call some internal applications and will take few hours. Due to some problems, I have to stop or kill that job. For this, first of all, I ran ps -u $uname to list ...
5
votes
2answers
77 views

Suspend process without killing it

So I've got a persistent program running in the background. Killing it just causes it to restart with a different PID. I'd like to suspend it (put it to sleep without actually killing it). Does kill ...
13
votes
4answers
118k views

How do I exit or cancel a bad bash command?

I expect to get some flak for this, but I can't find the answer anywhere. It seems like it should be so obvious. Sometimes, when I type a bad command in a bash terminal, the cursor just jumps down to ...
0
votes
2answers
46 views

process command and the percent sign usage

I am confused about stopping a job by using the percent sign with the kill command. I cannot find any documentation in the man pages for kill that indicate the percent sign can be used. Can someone ...
3
votes
2answers
58 views

How can I kill process by specific name and exclude root processes

Not a long time ago we found out about pkill and we had in mind to start using it in a setuid (for root) script for global clean-up of processes. This could save us lots of stupid maintenance where ...
1
vote
2answers
57 views

How can I CTRL^C out of a password prompt?

Say I started a su command, and I want to cancel it. Control+C doesn't work... I have to finish the prompt (either by getting the password wrong enough times or by getting it right). Is there ...
32
votes
9answers
4k views

How can I kill a process and be sure the PID hasn't been reused

Suppose, for example, you have a shell script similar to: longrunningthing & p=$! echo Killing longrunningthing on PID $p in 24 hours sleep 86400 echo Time up! kill $p Should do the trick, ...
21
votes
6answers
14k views

How can I close a terminal without killing its children (without running `screen` first)?

sometimes I run an app in the gnome-terminal, but then I suddenly have to restart gnome or something. I guess the answer to the question is also useful then I want to disconnect from SSH where ...
1
vote
0answers
20 views

killing subprocesses and traps

I have the following two scripts which simulate some work: start.sh simply launches 2 (mpi) processes with script mpiproc.sh. start.sh #!/bin/bash function trap_with_arg() { func="$1" ; shift ...
5
votes
1answer
369 views

Enable killing X.org with a custom key combination

I've just read How to enable killing X.org with ctrl+alt+backspace and am really happy, that control-alt-backspace no longer kills my X-Server. However, I'd like to have a way to kill it. It just ...
255
votes
12answers
230k views

What if 'kill -9' does not work?

I have a process I can't kill with kill -9 <pid>. What's the problem in such a case, especially since I am the owner of that process. I thought nothing could evade that kill option.
1
vote
2answers
68 views

How do I kill a process given its “command”?

I have a process called "P1", right now the way I kill the process is: $ ps aux | grep "P1" " Now it returns two processes related to "P1": one is the actual P1 process I want to kill, the other one ...
0
votes
2answers
71 views

Difference between stop, kill and terminate in Xfce task manager 1.0.1

The title says it all, I'm on Xfce desktop environment, using "Task manager 1.0.1". For more precision you can found it here, a link I got in the "About". When secondary clicking a process, I can ...
17
votes
5answers
11k views

How can I kill and wait for background processes to finish in a shell script when I Ctrl+C it?

I'm trying to set up a shell script so that it runs background processes, and when I Ctrlc the shell script, it kills the children, then exits. The best that I've managed to come up with is this. It ...
0
votes
1answer
35 views

Kill command also kills other process

I have a very simple script, let's call it foo.sh. It's this: #!/bin/sh sxhkd & panel & where panel is a script (I won't post it here because it's very long and I don't think it would be ...
1
vote
1answer
84 views

Kill a running shell script, and kill all process running within it

I have a shell script running in the background, which runs 5 different jobs. When I run the shell script all 5 jobs start running in order. When I kill this shell, whichever process is running, will ...
1
vote
4answers
81 views

Why does killall command kill only one instance of the process?

Sometimes I need to kill Google Chrome (of which I have 2 windows/instances opened). Both instances are not in incognito mode. What I do is: (on Debian 8) killall chrome && killall chrome ...
3
votes
1answer
76 views

sigint not being propagated to background child process

I need to send SIGINT to terminate a process gracefully but I can't. This is a sample, because the environment in which the execution occurs is 'unknown' (a bash script in travis.com) I managed to ...
1
vote
3answers
38 views

Shutdown PC after suspending terminal process (apt-get upgrade)

What's going to happen if I shutdown my PC after suspending a terminal process (with Ctrl+Z)? In my case, it's sudo apt-get upgrade. The upgrade file size is 250 MB, it takes far more time downloading ...
1
vote
3answers
53 views

What does the option -9 mean for killall?

I saw the command killall -9 but there is not such a option in the man page. So now I'm a bit confused: what does -9 option mean?
8
votes
1answer
296 views

cabal dies on NixOS in KVM

I set up a NixOS system on KVM and installed the haskelPlatform package. Everything works fine, ghci works fine, but cabal dies without any helpful error message: [michas@nix:~]$ type -a cabal cabal ...
4
votes
2answers
79 views

How can I kill my backticked yes process?

I was playing around in my terminal, which runs zsh. I typed the following: $ ` bquote> yes bquote> ` And then, yes started to run in the background, I think. Neither Ctrl + C nor Ctrl + \ ...
1
vote
1answer
88 views

use exec -a to name process but run it in the background immune to CTRL-C

I would like to start a background process from bash script, but at the same time give it another name and also make it immune to CTRL-C. I tried the following: exec -a NiceName java -cp ....long ...
2
votes
2answers
565 views

What is the difference between kill , pkill and killall

I am familiar with kill command , and most of the time we just use kill -9 to kill a process forcefully , there are many other signals that can be used with kill. But i wonder what are the use cases ...
1
vote
1answer
66 views

How to kill telnet started via SSH?

I am sending a command to remote server via SSH as ssh raja@remote_host "telnet 192.168.56.101 8080" But we all know that , to quit from telnet we need to get back to telnet prompt with CTRL+^] ...
2
votes
4answers
18k views

process id and killing process - ps commmand

Please see the output of below ps command: abc@smaug:~/Desktop$ ps ax | grep firefox 2213 ? Sl 2:01 /usr/lib/firefox/firefox 2644 pts/0 S+ 0:00 grep --color=auto firefox Please ...
2
votes
1answer
97 views

How is sudo interrupted in xterm on Ctrl-C? [duplicate]

Please explain in detail (including tty related stuff) how is a sudo foreground process on a X terminal emulator actually killed on the Ctrl-C. See the following example please: $ sudo -u test_no_pw ...
3
votes
1answer
78 views

Difference between less violent kill signal -HUP (1) -INT (2) and -TERM (15)

Apart from the most violent kill -9 (SIGKILL), I don't quite understand the difference between the 3 other common signals (here) -HUP (1), -INT (2), and -TERM (15). In which scenarios would one work ...
1
vote
1answer
27 views

How to programatically disconnect a ssh user?

I need to force a disconnect all sessions for a given user. Since this user might be root as well I think it would be better to avoid killing the parent sshd process along the way. Is there a ...
0
votes
1answer
43 views

How to extract all links from a given url in a decent time

I'm trying to extract the links from a specified url and redirect them to a file. At first I tried using --spider , this is my code: wget --spider --force-html -m http://file/path 2>&1 | grep ...