Switch from GUI to Terminal (TTY) on Ubuntu — Keyboard Shortcuts & Methods

Switch from GUI to Terminal (TTY) on Ubuntu — Keyboard Shortcuts & Methods

Derrk SamuelJune 5, 20264 min read
Use keyboard shortcuts or command-line commands to switch between the graphical desktop and text-only terminal (TTY) on Ubuntu.

Switch from GUI to Terminal (TTY) on Ubuntu

You can easily switch from the GUI (Graphical User Interface) to a text-only terminal (known as a virtual terminal or TTY) using keyboard shortcuts.


Using Keyboard Shortcuts

The most common method is to use Ctrl + Alt + F3 to switch to a terminal session.

Switch to Text Terminal

Press:

Ctrl + Alt + F3

You can also use F4, F5, or F6 to access different terminal sessions:

Ctrl + Alt + F3   (TTY 3)
Ctrl + Alt + F4   (TTY 4)
Ctrl + Alt + F5   (TTY 5)
Ctrl + Alt + F6   (TTY 6)

At the prompt, log in with your username and password, then you have full command-line access.


Returning to the GUI

To switch back to your graphical session from the terminal:

Press:

Ctrl + Alt + F2

Older Ubuntu versions: The GUI might be on F7, so try:

Ctrl + Alt + F7

On Laptops (Fn Key)

On some laptops, you may need to press the Fn key in combination:

Ctrl + Fn + Alt + F3   (to terminal)
Ctrl + Fn + Alt + F2   (back to GUI)

Check your laptop's keyboard layout if standard shortcuts don't work.


Alternative Method: Command Line

If you have a terminal window open within the GUI, you can stop the graphical display manager directly.

Disable GUI and Switch to Console

Open a terminal in the GUI (usually Ctrl + Alt + T) and run:

sudo systemctl isolate multi-user.target

This disables the graphical desktop and drops you to a console prompt. You may still need to switch to an available TTY using Ctrl + Alt + F3.

Re-enable the GUI

From the console, run:

sudo systemctl start graphical.target

You may then need to switch back to the correct TTY using Ctrl + Alt + F2.


Quick Reference

GoalShortcut
Switch to terminal (TTY 3)Ctrl + Alt + F3
Switch to terminal (TTY 4)Ctrl + Alt + F4
Switch to terminal (TTY 5)Ctrl + Alt + F5
Switch to terminal (TTY 6)Ctrl + Alt + F6
Return to GUICtrl + Alt + F2
Return to GUI (older versions)Ctrl + Alt + F7
Disable GUI via commandsudo systemctl isolate multi-user.target
Re-enable GUI via commandsudo systemctl start graphical.target

Common Use Cases

Troubleshooting GPU or Display Issues: If your GUI becomes unresponsive or freezes, switch to a TTY and diagnose the problem from the command line.

Lightweight Work: TTYs use far fewer resources than the GUI. Switch to a terminal session if you're running resource-intensive tasks and want to free up memory.

Remote Server Access: When SSH-ing into a remote Ubuntu server, you're already in a terminal. These shortcuts don't apply, but the concepts are the same.

Recovery Mode: If your desktop environment crashes, TTY access lets you restart the display manager or debug system issues.

Most modern Ubuntu systems use F2 for GUI and F3–F6 for terminals. Test different F-keys if the standard shortcuts don't work on your system.

D

Derrk Samuel

Web3, crypto, and Linux PC insights — practical guides, security tips, mining setups, blockchain tools, and decentralized tech strategies for techs.

Discussion

Leave a comment

No comments yet. Be the first to start the discussion!