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?

3
  • you can press ctrl+alt+f1 then execute this command after login: sudo pkill Xorg, it will restart Xserver session. try it.. Sep 6, 2013 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) Sep 6, 2013 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.. ;) Sep 6, 2013 at 16:16

3 Answers 3

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.

3
  • 1
    What does it do?
    – 11684
    Sep 6, 2013 at 17:51
  • Please explain. What does that do?
    – Ajedi32
    Sep 6, 2013 at 17:57
  • I don't have any SysRq key on my keyboard. On my notebook the most similar key is "Stamp R Sist"("Stamp" on the desktop keyboard). What keys should I use in this case? (keyboard is an Italian standard keyboard).
    – Bakuriu
    Sep 6, 2013 at 19:54
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!

2
  • Alt+F7? Surely you mean Ctrl+Alt+F7 (unless this has changed). Sep 6, 2013 at 16:05
  • Oh! My God! I don't know what is happening to me today. :D My fault. Sorry, you're right. Thank you very much. :D Sep 6, 2013 at 16:13
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
1
  • 2
    some times can't switch between ttys :(
    – dedunumax
    Sep 6, 2013 at 16:36

Not the answer you're looking for? Browse other questions tagged or ask your own question.