If I run jobs with sudo I can't kill %1 them (Operation not permitted). My first thought was to use sudo kill %1 instead, but that of course doesn't work either because it won't use the bash builtin kill. Is there a trick to make this work?
// I know how to kill a process through it's PID. The question is specifically about how to use the job id to kill a sudo job.
man kill,man ps,man pgrep,man pkill,help jobs– Parthian Shot Mar 16 '16 at 18:32builtin, e.g.builtin kill. – Xiong Chiamiov Mar 17 '16 at 23:00sudo builtin kill -lgivessudo: builtin: command not found– wisbucky Mar 07 '19 at 00:03sudowon't see the same list ofjobs. If you dosudo jobs, you won't see%1listed. So it will never work with%1. You have to use the actual PID (which is effectively what Parthian's answer is doing). – wisbucky Mar 07 '19 at 00:14