5

How to switch between console and GUI in Ubuntu 17.04? I wanted to see what key functions would allow me to switch between the two. I’m starting to learn to program in Ubuntu as a beginner.

  • 2
    You are running a "Terminal" and you want to switch between it and the other GUI applications right? if that's the case use Alt+Tab otherwise explain it more clearly. – Ravexina May 21 '17 at 7:20
  • 4
    Possible duplicate of Switching Between GUI and Terminal – muru May 21 '17 at 11:20
  • VTR so that this can be closed as the called duplicate. – Elder Geek May 12 '18 at 20:30
  • 1
    @ElderGeek I don't know why everyone's so excited about closing this question as a duplicate of "Switching Between GUI and Terminal". Despite its adorable but confusing title, what that question is about is I was just curious what the keyboard shortcuts mentioned above do to the GUI when switching between them. – karel May 14 '18 at 8:54
  • 1
    @ElderGeek You got half of the currently supported releases this time. That's better than nothing. – karel May 14 '18 at 21:59
11

By default Ubuntu has 6 virtual consoles tty1-tty6 which are accessed by the keyboard combinations Ctrl+Alt+F1 to Ctrl+Alt+F6. The virtual console can also be accessed from a black screen if the boot process stops at a black screen when booting. To access the GUI from any virtual console press the keyboard combination Ctrl+Alt+F7.

Starting with Ubuntu 17.10 the virtual consoles are accessed by the keyboard combinations Ctrl+Alt+F3 to Ctrl+Alt+F6. To access the GUI from any virtual console press the keyboard combination Ctrl+Alt+F2.

To login from a virtual console:

  1. At the login: prompt type your username and press Enter.

  2. At the Password: prompt type your user password and press Enter. After you have logged in, you can run commands from the virtual console.

  3. To bring up the normal Ubuntu login screen run this command:

    sudo systemctl start lightdm.service  
    

    In 16.04 and later run this command instead to bring up the normal Ubuntu login screen:

    sudo systemctl start graphical.target
    
  • In Ubuntu 17.10 and later, tty1 (accessed by Ctrl+Alt+F1) contains the login screen, and tty2 (accessed by Ctrl+Alt+F2) contains your actual loaded graphical session. – karel Jun 21 '18 at 11:20
  • It is even possible to login twice on tty1. Then the first GUI is on tty2 and the second on tty3 (or whatever is the next available one). – PerlDuck Jul 8 '19 at 17:02

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.