Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see:
viewtopic.php?t=158230
New to Debian (Or Linux in general)? Ask your questions here!
alete
Posts: 19 Joined: 2017-05-19 16:42
#1
Post
by alete » 2018-05-29 15:37
Hello, everybody.
I'm running a clean Debian 9 on my laptop and I'm being unable to kill a proccess giving it's job number:
Code: Select all
alete@debian:~$ vi &
[1] 14760
alete@debian:~$ jobs
[1]+ Stopped vi
alete@debian:~$ sudo kill %1
kill: failed to parse argument: '%1'
alete@debian:~$
wasn't it supposed to work this way?
kingocounty
Posts: 12 Joined: 2018-03-14 13:11
#4
Post
by kingocounty » 2018-06-01 12:35
Bash has a built-in kill function that takes precedence over the external kill command, and it does support jobspecs.
Typing
will show you the details.
Try your command again without 'sudo'.
debiman
Posts: 3063 Joined: 2013-03-12 07:18
#5
Post
by debiman » 2018-06-02 11:33
kingocounty wrote: Try your command again without 'sudo'.
i remembered this a second after i pressed reply, but was too lazy to go back and edit...
alete
Posts: 19 Joined: 2017-05-19 16:42
#6
Post
by alete » 2018-06-26 14:35
kingocounty wrote: Bash has a built-in kill function that takes precedence over the external kill command, and it does support jobspecs.
Typing
will show you the details.
Try your command again without 'sudo'.
nothing happens without sudo
Code: Select all
alete@debian:~$ jobs
[1]+ Stopped top
alete@debian:~$ kill %1
[1]+ Stopped top
jobse@debian:~$
jobs
[1]+ Stopped top
alete@debian:~$
bw123
Posts: 4015 Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times
#7
Post
by bw123 » 2018-06-26 15:45
works here on xterm, after hitting enter twice, as mentioned in this nice turtorial...
https://www.digitalocean.com/community/ ... -processes
...
Depending on how your terminal is configured, either immediately or the next time you hit ENTER, you will see the job termination status:
...
Code: Select all
$ nano &
[1] 716
$ jobs
[1]+ Stopped nano
$ kill %1
$
[1]+ Terminated nano
$
resigned by AI ChatGPT
alete
Posts: 19 Joined: 2017-05-19 16:42
#8
Post
by alete » 2018-06-26 20:52
bw123 wrote: works here on xterm, after hitting enter twice, as mentioned in this nice turtorial...
https://www.digitalocean.com/community/ ... -processes
...
Depending on how your terminal is configured, either immediately or the next time you hit ENTER, you will see the job termination status:
...
Code: Select all
$ nano &
[1] 716
$ jobs
[1]+ Stopped nano
$ kill %1
$
[1]+ Terminated nano
$
and that, my friend... it's what I call a "good call". Not that I understand why, but it worked. Thanks!