What is the command to return to the graphical desktop after entering the terminal mode with Ctrl+Alt+F1? I need it for operating my Raspbian.


On some systems it is Alt+F8 or Alt+F9, on others it is Alt+F7. The Ctrl is not needed to come back from the tty, only to drop to it.

The actual F key depends on which tty your X session is running in. As far as I know, the default value is 8 (or 7) so Alt+F8 should do it. If not, just try the other values until you hit the right one.

As @mantawork points out in the comments, a generic way is Alt+Left Arrow while in terminal 1. In general Alt+Left Arrow or Alt+Right Arrow will cycle through the ttys. If you repeat that you will eventually be taken back to the one that has your X session.

  • Which TTY it's on is very distro specific. Brand new installs can still use tty 7. – Patrick Oct 28 '13 at 18:01
  • @Patrick OK, I just used to always have 7 and now always have 8 so I thought it was A New Thing. Thanks, answer edited. – terdon Oct 28 '13 at 18:02
  • @Patrick seems to be DM-specific to me. I remember switching from LightDM to KDM and it switched from tty7 to tty8. Maybe dependent on both? – strugee Oct 28 '13 at 18:05
  • 2
    @strugee it depends on how X is getting started. If there is a specific init script for LightDM vs KDM, then yes, it could vary by display manager. However on my distro Xorg is started the exact same no matter the display manager. The display manager is started after X is up. – Patrick Oct 28 '13 at 18:07
  • 2
    Or a generic way, supposing you have only one X session stared: Alt-F1, Alt-LeftArrow. – manatwork Oct 28 '13 at 18:31

I had the same question/problem.

Alt-LeftArrow and Alt-RightArrow didn't do anything for me. They just printed ^[[C and ^[[D on the screen.

Mine ended up being Ctrl-Alt-F3. It varied depending on number of ttys that were configured in /etc/ttys. I had 2 uncommented ttys, so it was Ctrl-Alt-F3. When I uncommented another tty, it became Ctrl-Alt-F4.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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