4

I'm coming from windows and still new to Ubuntu. Occasionally everything freezes and I lose my taskbar and launcher. What do I do? What's the Ubuntu equivalent of ctrl+alt+del in Windows? I tried alt+f2 to bring up the "special terminal," but what can I do from there? I tried "sudo shutdown now" but that didn't fully shut down the computer and I needed a hard shutdown.

If I do manage to figure out what's wrong and fix it from the alt+f2 terminal, how do I get back to the desktop?

Braiam
  • 67,791
  • 32
  • 179
  • 269
Jeffy Weffy
  • 153
  • 1
  • 7
  • you can press ctrl+alt+f1 then execute this command after login: sudo pkill Xorg, it will restart Xserver session. try it.. – Saurav Kumar Sep 06 '13 at 15:09
  • @SauravKumar there are better ways to restart X: either sudo service lightdm restart in a VT (for unity) or Alt+SysReq+K to more directly tell X to restart (this used to be Ctrl+Alt+Backspace) – SlightlyCuban Sep 06 '13 at 16:12
  • @SlightlyCuban: Yes that would be the better way if you know the display manager he is using.. But if you don't know anything and still want to tell a command that will definitely run then.. You know the rest.. ;) – Saurav Kumar Sep 06 '13 at 16:16

3 Answers3

5

Alt + SysRq + r , e , i , s , u , b (busier backwards) if can not even bring up terminal.

More details, and explanation, can be found in the "Magic SysRq Key" Wikipedia article.

Eliah Kagan
  • 117,780
fleamour
  • 1,573
3

You may try "sudo reboot now" which will send a reboot signal and reboot the computer or sudo reboot -f now which will do the same but forcing the reboot.

Other valid commands are:

For a shutdown

sudo shutdown -h now

or

sudo poweroff

For a reboot

sudo shutdown -r now

But if everything simply halted (stopped working) you may wish to first give a chance to the killall5 command in the terminal which will attempt to log out your current session without rebooting nor shutting down. This will automatically return you to the desktop session in order to choose your username and write your password.

If you already fixed the issue in the virtual terminal you can hit CtrlAltF7 in order to return to your Desktop session.

Good luck!

3

Please try to use the following commands after switching to tty by pressing CTRL+ALT+F2 it may help you to solve your problem:

    sudo stop lightdm
    sudo start lightdm
    sudo restart lightdm
    unity --reset
Saurav Kumar
  • 14,916
Anuraj
  • 56
  • 5