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.
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:
login:prompt type your username and press Enter.
Password:prompt type your user password and press Enter. After you have logged in, you can run commands from the virtual console.
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