Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Kill Process

  1. #1
    Join Date
    May 2006
    Beans
    12

    Kill Process

    Hi,

    How would I kill a process from with bash? Do I always need to end the process using PID? I have tried "Killall Firefox" and it doesn't seem to work, is there way to read the current processes from within bash?

  2. #2
    Join Date
    Oct 2004
    Location
    Scotland
    Beans
    642
    Distro
    Ubuntu Development Release

    Re: Kill Process

    killall firefox-bin

  3. #3
    Join Date
    Oct 2004
    Location
    Scotland
    Beans
    642
    Distro
    Ubuntu Development Release

    Re: Kill Process

    "ps -e" will show you running processes.

  4. #4
    Join Date
    May 2006
    Beans
    12

    Re: Kill Process

    Awesome, thanks.

  5. #5
    Join Date
    Feb 2005
    Location
    California, USA
    Beans
    200

    Re: Kill Process

    Also try pkill, which is a bit cleaner than parsing the output of ps yourself.

  6. #6
    Join Date
    Feb 2007
    Location
    Central MA
    Beans
    33
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Kill Process

    Isn't there a command that you can type in the terminal that will turn the cursor into a skull and cross bones, and then you can kill any application by clicking on it with that?

    I forget what that one is.

  7. #7
    Join Date
    Apr 2006
    Location
    Atlanta, USA
    Beans
    427

    Re: Kill Process

    The command you're thinking of is 'xkill'.

    Generally I do something like this:

    Code:
    kill -TERM `pidof firefox`
    Here we are, trapped in the amber of the moment. There is no why.

  8. #8
    Join Date
    Feb 2007
    Beans
    521
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Kill Process

    Some additional info regarding the topic. The purpose of the kill command is to send signals to a process. The default signal sent is 15 - SIGTERM - termination signal. 9 (SIGKILL) is a more hard and sure way to kill a process - a process can ignore sigterm, but sigkill is the "finger of death". There are several more signals: http://linux.die.net/man/7/signal

    Two signals I find interesting are SIGSTOP and SIGCONT. With sigstop you can "freeze" a process. Use sigcont to unfreeze it. Beware that this can lead to problems, for example with files used by the frozen process.
    make install - not war!

    Oh hai!

  9. #9
    credobyte is offline Iced Blended Vanilla Crème Ubuntu
    Join Date
    Jun 2009
    Beans
    1,559
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Kill Process


  10. #10
    Join Date
    Feb 2009
    Beans
    789
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Kill Process

    Quote Originally Posted by credobyte View Post
    Yes, it's one post above your post in this thread..?

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •