Frozen Screen, How to kill the process without Power-Off?

Posted on 2005-04-09
Last Modified: 2008-02-01
Hello!  Everyone,

I am still somehow a newbie to Linux, and am missing some essential commands.   One is "killing a frozen process" in GUI when I got a frozen non-responsive screen.   Here is my details.

My Linux 2.2.14/RedHat 6.2 is stand alone, like a personal computer, and not Networked.   The most problematic freezing is the cases when I am using FileManager (GNU Midnight Commander 4.5.42), and am doing the files to drag to copy or drag to print (on printer applet).   So, recently I am avoiding "dragging" files, but do other ways (menu -> File -> copy ;  OR right-mouse click ->  copy).   In PC, <Ctrl><Alt><Del>, in Macintosh <Alt><AppleCommand><Esc> works fairy well to kill the frozen process, but I haven't found the counter part command in Linux_X_GUI.   Any suggestions?   Thank you.    mkido
Question by:mkido
    LVL 9

    Accepted Solution

    In Linux you have commands as follows:
    # ps -fael | grep "mc"
    This will display all processes using your comuputer with their IDs. To get to theis, you have to press Ctrl+Alt+F1. This takes you to a console screen where you need to login as root user. I have used grep command to find the process with "mc" in any part of the commands returned.

    After you have identified the process to kill from above command, you can use following command to kill the process you wish to kill:
    # kill -9 <process_id>
    where <process_id> is the PID you obtained for the process to be killed using the ps command.

    To kill an X session, you need to type Ctrl+Alt+Backspace keys together.

    You can find out more about the commands using the man command.
    # man ps
    will display all details about the ps command in Linux.
    LVL 3

    Expert Comment

    you can also try xkill.

    just type "xkill" from a terminal and select the window you want to close out.
    LVL 38

    Expert Comment

    Try "gtop", Gnome top.

    Assisted Solution

    Hi mkido,

    Have you tried ctrl+shift+backspace or ctrl+alt+backspace....



    LVL 12

    Expert Comment

    NETANBU - your suggestion will kill the GUI and cause it to restart. That's a little drastic here...

    Basically, here's the process to kill of a process (hmm... that sounds weird...)


    First, you have to find the process. This would be done from a prompt with somehthing like "ps -ef", which lists ALL running processes. If you know something specific about the process (like the name of the executable), you can pass it through grep with that information to get a shorter list. This would be something like "ps -ef | grep mc". Once you have your "short list", you need to identify specifically which one needs to go. Once you know that one, get the process id number for it (of the two columns with numbers, it's the one on the left). Then, kill it. This would be something like "kill -9 5555", except 5555 should be replaced with the actual process number.

    Another way to kill running programs is with killall. "killall -9 bash" would immediately terminate ALL instances of the BASH shell running on the machine. Since this command is a little more "heavy-handed", be sure you know what it might do when you run it.
    LVL 6

    Assisted Solution

    You might also try CNTL-ALT-F3 or CNTL-ALT-F7 to jump to a console mode. The most useful app I have found is good old pkill ported over from solaris (allows you to kill processes by name e.g: pkill -9 smbd)

    Author Comment

    Hello!  Everyone,
    Thank you very much a lot of comments.   As I described in my question, my Linux can't be access from other networked computer(s), so that once the X_screen is frozen, no way to type in the command or review the processes.   I will try a couple of multiple Keyboard typing ways, and will feed back here soon.   One moment.   mkido

    Author Comment

    Hello!  Everyone,
    This is very stupid comment to write, but I am trying to get a freezing screen to test your comments, but never get frozen.      It is working fine against my effort.   So, I will test your suggestions in another chance.   If I will have an interesting observation, I will open a followup note at that time.   Thank you all.       - mkido  

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
    The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. Once you open the link you will see …
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now