On 03/25/2017 06:15 AM, Scott scottro@nyc.rr.com [LINUX_Newbies] wrote:
>
>
> On Sat, Mar 25, 2017 at 07:00:37AM +0100, 'highskywhy@yahoo.de'
> highskywhy@yahoo.de [LINUX_Newbies] wrote:
>> hello stupid question again from sophie how to kill a task
>> you cannot say killall -9 vivaldi but u must say killall -9 vivaldi-bin
>> how to kill chromium?
>>
>> killall -9 chromium does not work and killall -9 chromium-browser does
>> not work.
>>
>> we do it now in the bad way
>> we do top
>> and then we kill task by task with kill 1234 kill 4543 and so on and so
>> we kill every tab
>
> Using kill has to be used with the PID (Process ID) of the task.
> The same for kill -9. To use the name of the process you use pkill, for
> example,
>
> pkill chrom (even if you don't have the full name, it should work, but
> chrome usually opens up a bunch of PIDs.
>
> I have a one line script that looks for the processes and kills them.
> It's not elegant but works.
>
> pgrep chrome|xargs kill -9
>
> The pgrep gets the PID, then xargs uses that result to do something else,
> in this case, kill -9.
>
> Anyway, if you're killing a process by name, use pkill, not kill.
> To get a PID, you can use pgrep rather than running top, though either one
> works.
>
> --
> Scott Robbins
I'd never heard of pkill before. I'll have to remember that one...
Posted by: Michael <msulli1355@gmail.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (31) |
No comments:
Post a Comment