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

learn more… | top users | synonyms

1
vote
1answer
22 views

Point and click Ubuntu 16.04 bash script randomly alternates output behavior

I wrote and tested the following point and click Ubuntu 16.04 bash script for the purpose of completely killing a mono-service RecorderManager.exe process by literally killing the process id returned ...
1
vote
0answers
6 views

“Clicking the X” in spectrwm

I'm happily using spectrwm and looking for a way to "click the X", to close a window and kill the process. Both MOD+X and MOD+SHIFT+X just make the window disappear, the process keeps running. How ...
0
votes
2answers
187 views

Creating an automated idle process kill script

I would like to implement a solution to a specific instance of the generic problem wherein idle users tie up resources. I know the user list can be retrieved with w, the associated PID with ps, and ...
11
votes
1answer
536 views

Is there any way to tell if a shell script was killed with signal 9

I have a bash script (called from a java program) that keeps getting killed. I always catch the signal 15 with trap but then some other signal comes along that I suspect is signal 9 but am in ...
14
votes
4answers
124k 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 ...
20
votes
9answers
42k 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 ...
0
votes
3answers
73 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 ...
2
votes
1answer
21 views

Closing many gnuplot -persist windows

I just opened more than a hundred persistent graphing windows using gnuplot -persist with x11 on a RHEL desktop. Is there any easy way to close them all? I don't really want to logout/in or click ...
1
vote
1answer
92 views

A quit command weaker than windowkill?

Typing in xdotool getwindowfocus windowkill currently terminates the active window and bypasses any safeguards like "would you like to save your work?". Is there a weaker command than windowkill I ...
3
votes
2answers
266 views

How do I kill all processes except PID 1?

I want to kill all processes on a system except for PID 1. I am currently using pgrep -l . | awk "{if (\$1 != 1) print \$1}" | xargs -n 1 kill -s INT. awk is used to exclude the process with PID 1 ...
0
votes
2answers
4k views

`ps | grep | kill` aborts my script prematurely [duplicate]

I have a Linux computer that I remotely SSH into using plink on a Windows XP machine. I have a Plink program set to execute commands in a script using automated login: plink -ssh [domain name] -l ...
1
vote
1answer
807 views

Linux- Stop a process running as daemon

I've started uwsgi as a daemon, how can I kill that process? Everytime I kill its pid, and then does ps aux | grep "uwsgi", it again comesin the output. I've also tried pkill uwsgi, but no use. How ...
3
votes
2answers
96 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 for su like it does for sudo... I have to finish the prompt (either by getting the password wrong enough times or by ...
1
vote
1answer
255 views

Why should I not use 'kill -9' / SIGKILL

Posting this question because I was surprised to not find it directly answered; apologies if this is a duplicate - I did look! I have heard that kill -9 or kill -SIGKILL is bad, but I don't ...
0
votes
3answers
1k 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
58 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
35 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
40 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
37 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
151 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
23 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
35 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
13 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 ...
1
vote
3answers
31 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
69 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
307 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
30 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
52 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
40 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
52 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
61 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
81 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 ...
3
votes
2answers
69 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 ...
32
votes
9answers
5k 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, ...
22
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
370 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 ...
259
votes
12answers
236k 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
72 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
83 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
36 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
108 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
88 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
93 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
40 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 ...
2
votes
3answers
87 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?