280
rule (lemmy.ml)
submitted 9 months ago by 0x2d@lemmy.ml to c/196@lemmy.blahaj.zone
you are viewing a single comment's thread
view the rest of the comments
[-] I_like_cats@lemmy.one 29 points 9 months ago

It's easy. Just open up a terminal and type

kill $PID

(Replace the $PID with the process id of the process) if you don't know the process id you can do

killall process_name

If these don't work you can add a -9 to banish them and give them no chance to resist

[-] joyjoy@lemm.ee 5 points 9 months ago

Similarly, $$ is the current PID, $PPID is the parent PID. (Bash)

[-] HappyFrog@lemmy.blahaj.zone 3 points 9 months ago

So 'kill -9 $$' is just suicide?

[-] joyjoy@lemm.ee 5 points 9 months ago

With suicide, you have a chance to get your affairs in order. kill -9 $$ is hiring an assassin to kill you and not tell you when it will happen. It happens suddenly without warning.

[-] joulethief@compuverse.uk 3 points 9 months ago

You can type seppuku for that

[-] SoonaPaana@lemmy.world 5 points 9 months ago

Also please refresh my memory on how to find the process ID

[-] I_like_cats@lemmy.one 11 points 9 months ago

You can do

ps aux | grep -i <part of process name>

and the PID is in the second column of the output. However for this use case I recommend a process manager like htop or btop

[-] assaultpotato@sh.itjust.works 5 points 9 months ago

I use ps -aux | grep $EXECUTABLE

htop or any process monitor will tell you.

[-] gayhitler420@lemm.ee 1 points 9 months ago
[-] Krzd@lemmy.world 1 points 9 months ago

top for Ubuntu at least will show you the top processes, I think sorted by averaged CPU usage.

[-] AnUnusualRelic@lemmy.world 4 points 9 months ago

You probably want to get on the habit of using pkill instead of killall in case you're ever on a different system. You could have a surprise.

this post was submitted on 17 Feb 2024
280 points (100.0% liked)

196

16501 readers
3618 users here now

Be sure to follow the rule before you head out.

Rule: You must post before you leave.

^other^ ^rules^

founded 1 year ago
MODERATORS