How to handle linux system when it hangs?

Posted: December 12, 2011 in Linux
Tags: , , , , ,

Its very familiar that we use ctrl + alt + delete to terminate process or to restart the system when we are in windows. But in linux we have to follow some different mechanisms. Simply pressing the restart button will corrupt the file system. Please dont do that. Follow these steps.

1. First we will try to restart X Server. It can be done by pressing ctrl + alt + backspace. When you press this key combination all the process will be killed and system will be logged out. You will see the login screen again.

2. If you didnt get succeeded in first step, press ctrl + alt + F6 and move to console screen.. Enter login credentials. Restart computer by this command
$ sudo shutdown -r now.

3. Even if above 2 steps doesnt work, we will follow this little complicated step. Hold alt + SysRq(Prnt Scrn key) and type REISUB. The computer will get restarted.

4. If a certain process say firefox makes your linux system to hang, its not wise to restart your computer. Better kill the process.

press ctrl + alt + F2 and login as Super user.

find PID of the process
# ps au | grep tty1

This will show the current running process in terminal 1. The second column is the PID(Process ID)
Then use kill command to kill the process which hangs the system
# kill [PID]

Follow above steps based on the priority to recover your linux system when it hangs.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s