Results 1 to 8 of 8

Thread: Killing Firefox from the commandline

  1. #1
    Join Date
    May 2007
    Location
    USA
    Beans
    70
    Distro
    Ubuntu 12.04 Precise Pangolin

    Angry Killing Firefox from the commandline

    With the latest update 79.0, you can no longer use killall.
    killall firefox
    firefox: no process found


    Instead you can use:
    killall MainThread
    Exiting due to channel error.
    Exiting due to channel error.
    Exiting due to channel error.


    So let's look at "/proc/pid/stat".
    cat /proc/12739/stat
    12739 (MainThread) S 3512 12739 3512 34816 15233 4194560 551978 15048 113 24 8174 3959 10 12 20 0 64 0 1958217 2955112448 76249 18446744073709551615 93939634626560 93939635215853 140730397198832 0 0 0 0 4096 17663 0 0 0 17 0 0 0 43 0 0 93939635319016 93939635324368 93939645546496 140730397205385 140730397205410 140730397205410 140730397208543 0


    Normally that would show "(firefox)".

    There are ways around this using "pgrep" or "pkill". I just thought I would point it out. Good job Firefox!

    Last edited by salemboot; August 1st, 2020 at 04:51 AM.

  2. #2
    Join Date
    Jun 2006
    Location
    UK
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: Killing Firefox from the commandline

    Not a request for support. Thread moved to Ubuntu, Linux and OS Chat.
    Ubuntu 20.04 Desktop Guide - Ubuntu 22.04 Desktop Guide - Forum Guide to BBCode - Using BBCode code tags

    Member: Not Canonical Team

    If you need help with your forum account, such as SSO login issues, username changes, etc, the correct place to contact an admin is here. Please do not PM me about these matters unless you have been asked to - unsolicited PMs concerning forum accounts will be ignored.

  3. #3
    Join Date
    May 2010
    Beans
    3,242

    Re: Killing Firefox from the commandline

    Could use:
    Code:
     
    sudo kill -9 `ps -ef | grep firefox | awk {'print $2'}`

  4. #4
    Join Date
    Aug 2013
    Beans
    4,941

    Re: Killing Firefox from the commandline

    Code:
    killall -9 firefox
    will work

  5. #5
    Join Date
    Aug 2013
    Beans
    4,941

    Re: Killing Firefox from the commandline

    Quote Originally Posted by ActionParsnip View Post
    Could use:
    Code:
     
    sudo kill -9 `ps -ef | grep firefox | awk {'print $2'}`
    Why would you use sudo? Firefox is not a root process.

  6. #6
    Join Date
    Nov 2007
    Location
    London, England
    Beans
    7,701

    Re: Killing Firefox from the commandline

    Code:
    pkill -f firefox

  7. #7
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: Killing Firefox from the commandline

    I was just about to post this having found the thread I link to at the Mint forum.
    Have other users noticed that in, for example, the system-monitor a running firefox process now shows as MainThread, not firefox, and that the command
    Code:
    killall firefox
    simply reports that no running process was found.
    Code:
    ps aux | grep firefox
    still shows several firefox processes running.

    I have read through the long thread which also discusses this in the Mint forum starting at https://forums.linuxmint.com/viewtop...58610#p1858610 but that does not seem to come to any real conclusions about the reasons behind this.

    I agree that it's not a huge problem but simply wonder if anybody has background information as to why this change has occurred

  8. #8
    Join Date
    Aug 2017
    Beans
    178

    Re: Killing Firefox from the commandline

    I usually use

    Code:
    ps -aux | grep firefox
    The first result will be firefox, take it down and it takes all the children with it.

    Code:
    sudo kill (process id) -9
    I always had trouble without the brutality of -9.

    I do note that on my System 76 Gazelles I almost never have to do that, on my older desktop almost daily. So in my case it's partly a Firefox resource hog problem, partly a hardware system resources problem.

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
  •