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

learn more… | top users | synonyms

-6
votes
0answers
36 views

Evaluating the usefulness of Debian's 'top' command [on hold]

As part of my GCSE Computing course I am doing a controlled assessment which looks at some basic Debian commands. For the final, long-answer question, I must evaluate the usefulness of the 'top' ...
-5
votes
0answers
35 views

Using the top, kill and ps commands for system management [on hold]

I recognise that this question has been asked in multiple ways recently but I am required to complete research for an exam and I need an in-depth analysis. Hopefully this is specific enough as I don't ...
0
votes
1answer
31 views

Can't terminate / suspend a background job

I am a beginner so I wanted to do a test for the Job Control Commands. So, I ran a cat command and then made it a background job using the bgcommand after stopping it with Ctrl +Z. Now I wanted ...
1
vote
2answers
32 views

How to stop “tail -f” within a running script? [duplicate]

How can you stop a tail -f command after seeing a specific string/word? I'm trying to follow an expanding log and stop the tail after finding a specific word. Is there any kill command for that? I'm ...
1
vote
1answer
54 views

How to kill all sessions for a Linux user except first one, and limit users to one login session

I need to know how to kill all processes for a logged in user except the first one in linux redhat 6. for example, AZain user is logged in multiple times from different machines so I need to allow ...
1
vote
1answer
23 views

pkill not killing processes past immediate descendants of a process

I want to kill a chain of process e.g. PID PPID 100 XXX 101 100 102 101 When I use pkill -P 100 PID 100 and 101 die as expected, but 102 is given init as it's PPID. How can I force pkill to ...
2
votes
1answer
167 views

Does pkill kill itself (and its parent processes) last?

I'm writing a bash script that kills a bunch of processes selected by certain criteria and then quits. The only problem is that those criteria apply to the script and its parent processes (bash, sshd) ...
0
votes
0answers
19 views

What is difference between kill [pid] and kill -9 [pid] commands? [duplicate]

I've been using "kill -9 [process_id]" command to terminate the process such as hanged process. However someone told me it is better to use "kill [process_id]". Are there different consequences other ...
0
votes
2answers
76 views

Kill shell script process by name

I have a script running in background like this: nohup /tmp/a.sh & If the script is running for more than 5 mins, I want to kill it. -bash-3.2$ nohup /tmp/a.sh & [1] 2518 -bash-3.2$ nohup: ...
1
vote
0answers
11 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 ...
1
vote
1answer
37 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 ...
2
votes
1answer
35 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 ...
3
votes
2answers
324 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 ...
11
votes
1answer
558 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 ...
1
vote
1answer
259 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 ...
1
vote
2answers
62 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
48 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?)
3
votes
2answers
51 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 ...
1
vote
1answer
57 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 ...
1
vote
2answers
26 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
47 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
17 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
32 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
87 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 happening?...
1
vote
0answers
49 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
75 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
43 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
60 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
63 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 ...
0
votes
3answers
88 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
80 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 ...
3
votes
2answers
115 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
0answers
22 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 ...
1
vote
2answers
78 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
98 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 ...
0
votes
1answer
44 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
119 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 ...
5
votes
2answers
88 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 -...
1
vote
4answers
105 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
103 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
44 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
103 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?
4
votes
2answers
120 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
147 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
1k 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
95 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
1answer
114 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
152 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
36 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
52 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 ...