Please support VectorLinux!

Author Topic: [ctrl] [alt] [del] --> [End Task] ? How to do in Linux?  (Read 3132 times)

Sivatheja

  • Vectorite
  • ***
  • Posts: 156
    • Banthigaadu
[ctrl] [alt] [del] --> [End Task] ? How to do in Linux?
« on: February 04, 2008, 11:49:44 am »
Can one end non responsive task in Linux, as in windows?
LIke [End Task] or [End Process Tree] in windows?

What happens after three un successful attempts to login a [ctrl] [alt] [del] screen in  Linux?
« Last Edit: February 04, 2008, 11:51:44 am by sivatheja »
Full Linux Machine - Vector Linux 5.9 STD Gold, Intel - 1.79 GHz, 1Gb RAM, 60GB HDD

M0E-lnx

  • Administrator
  • Vectorian
  • *****
  • Posts: 3208
Re: [ctrl] [alt] [del] --> [End Task] ? How to do in Linux?
« Reply #1 on: February 04, 2008, 12:00:37 pm »
You can use htop from a terminal to see all the processes running

You can also use pidof to find a programs PID and kill it if you need to
Code: [Select]
pidof firefox
2117
kill 2117

Sivatheja

  • Vectorite
  • ***
  • Posts: 156
    • Banthigaadu
Re: [ctrl] [alt] [del] --> [End Task] ? How to do in Linux?
« Reply #2 on: February 04, 2008, 12:05:41 pm »
Wow!
Thank you!
But suppose PID 1111 has 10 child processes, and I Kill one of those 10 like this, then would it 'end tree'  or only that process?
How to end only the sub process, and the whole tree?

Thanks in advance!
Full Linux Machine - Vector Linux 5.9 STD Gold, Intel - 1.79 GHz, 1Gb RAM, 60GB HDD

caitlyn

  • Packager
  • Vectorian
  • ****
  • Posts: 2876
    • The Linux Works
Re: [ctrl] [alt] [del] --> [End Task] ? How to do in Linux?
« Reply #3 on: February 04, 2008, 12:23:36 pm »
There is also a graphic application killer called xkill.  If you run that you then drag your mouse pointer (a skull and crossbones) and click the ofending app almost always goes away.  This is often easiest for people coming from Windows.,
eMachines EL-1300G desktop, 1.6GHz AMD Athlon 2650e CPU, 4GB RAM, nVidia GeForce 6150 SE video
CentOS 6.5 (will try VL64-7.1 soon)

Toshiba Satellite A135-S4727,  Intel Pentium T2080 / 1.73 GHz, 2GB RAM, Intel GMA 950

HP Mini 110 netbook, 1.6GHz Intel Atom CPU, 2GB RAM, Intel 950 video, VL 7.1

Sivatheja

  • Vectorite
  • ***
  • Posts: 156
    • Banthigaadu
Re: [ctrl] [alt] [del] --> [End Task] ? How to do in Linux?
« Reply #4 on: February 04, 2008, 12:33:32 pm »
XKill is great!

but end process and end process tree?
I need this because, my IDE starts a server, and then hangs, I'll kill the IDE, but I should kill the server it  has started in addition. So, in Windows I  go for 'end process tree'.  Wanted something analogous here!

Thanks in advance.
Full Linux Machine - Vector Linux 5.9 STD Gold, Intel - 1.79 GHz, 1Gb RAM, 60GB HDD

GrannyGeek

  • Packager
  • Vectorian
  • ****
  • Posts: 2567
Re: [ctrl] [alt] [del] --> [End Task] ? How to do in Linux?
« Reply #5 on: February 04, 2008, 08:19:13 pm »
For ending processes I usually open a terminal and type
ps -e
at the prompt. That gives me a list of running processes. I find the number of the one I want to kill and type
kill processnumber
(substituting the actual number for "processnumber"). Then I run ps -e again to see if the process is gone and run the kill command again until whatever I wanted to get rid of is gone.

I think there's a way to kill a process and all its children, but I don't know how to do it. The ps -e routine works well enough for my needs.

If you run ps -e as user, you can kill only the processes that belong to you. If you run ps -e as root, you can kill anything.

This also works if things are so messed up that you have to open a new console with Alt-F2 or some other combination. After you log in, you can run ps -e and kill the problem processes, then do Alt-F7 to get back to your window manager.
--GrannyGeek
Registered Linux User #397786

Happily running VL 7 Gold on  a Sempron LE-1300 desktop (2.3 GHz), 4 G RAM,  GeForce 6150 SE onboard graphics and on an HP Pavilion dv7 i7, 6 gigs, Intel 2nd Generation Integrated Graphics Controller

Pita

  • Vectorian
  • ****
  • Posts: 1324
Re: [ctrl] [alt] [del] --> [End Task] ? How to do in Linux?
« Reply #6 on: February 04, 2008, 08:29:50 pm »
I put a little executable script in ~/bin called ".kill"

#!/bin/sh
kill $(/sbin/pidof -x $1)

Then from a terminal ".kill firefox" will kill firefox if that is wanted. Naturally w/o the quotes.

The Headacher

  • Louder than you
  • Global Moderator
  • Vectorian
  • *****
  • Posts: 1553
  • I like the bass to go BOOM!
    • Multimedia on VL (work in progress)
Re: [ctrl] [alt] [del] --> [End Task] ? How to do in Linux?
« Reply #7 on: February 05, 2008, 07:21:04 am »
Quote
I put a little executable script in ~/bin called ".kill"

#!/bin/sh
kill $(/sbin/pidof -x $1)

Then from a terminal ".kill firefox" will kill firefox if that is wanted. Naturally w/o the quotes.
Why not use killall instead?
Most music on my soundcloud page was arranged in programs running on VL.

Pita

  • Vectorian
  • ****
  • Posts: 1324
Re: [ctrl] [alt] [del] --> [End Task] ? How to do in Linux?
« Reply #8 on: February 06, 2008, 01:22:08 am »
Quote
I put a little executable script in ~/bin called ".kill"

#!/bin/sh
kill $(/sbin/pidof -x $1)

Then from a terminal ".kill firefox" will kill firefox if that is wanted. Naturally w/o the quotes.
Why not use killall instead?

Since I was not aware of this command. Thanks!

Sivatheja

  • Vectorite
  • ***
  • Posts: 156
    • Banthigaadu
Re: [ctrl] [alt] [del] --> [End Task] ? How to do in Linux?
« Reply #9 on: March 02, 2008, 01:31:17 am »
Just an FYI:
Type in 'h' or 'F1' when in 'htop' in a terminal and you'll get a useful help. We have a tree view indicating process hierarchy, and moreover each process can be marked and killed :D So problem solved.
Full Linux Machine - Vector Linux 5.9 STD Gold, Intel - 1.79 GHz, 1Gb RAM, 60GB HDD

Power of the Son

  • Member
  • *
  • Posts: 2
Re: [ctrl] [alt] [del] --> [End Task] ? How to do in Linux?
« Reply #10 on: April 18, 2008, 05:03:32 pm »
I found out you can just press ctrl+alt+esc and it will allow you to kill the application if you computer starts to slow down from an application. I find this much easier than opening htop (I prefer ksysgard). But if you can't visibly see the application or click on it, this is pointless.