Switch back to cmd line from GUI (Ubuntu)

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

"Ask Ubuntu"
 
Using Keyboard Shortcuts

The most common method is to use the 

Ctrl + Alt + F3 

shortcut to switch to a terminal session. 

To access a text terminal,

 press: 

Ctrl + Alt + F3

 (or any key from F3 to F6)

 At the prompt, you will need to log in with your username and password, after which you can use the command line. 

"Ask Ubuntu"
 

Returning to the GUI

 To switch back to your graphical session from the terminal:

Press: 

Ctrl + Alt + F2


In some older configurations, 

the GUI might be on F7,

 so you could try 

Ctrl + Alt + F7

 if F2 doesn't work.
 
On some laptops, you might need to also press the Fn key in combination with the other keys (e.g., Ctrl + Fn + Alt + F3). 

"Ask Ubuntu"
 

Alternative Method (Command Line)

 If you have a terminal window open within the GUI, you can also stop the graphical display manager (e.g., GDM or LightDM) using a command, which will drop you to a console prompt. 
 
Open a terminal within the GUI (Ctrl + Alt + T is a common shortcut).

 To temporarily disable the GUI and switch to a text console, 
run:

bash

sudo systemctl isolate multi-user.target

 This may still require you to switch to an available TTY using 

Ctrl + Alt + F3

 or similar key combination.

To start the GUI again from the console,

 run:

bash

sudo systemctl start graphical.target
 
You may then need to switch back to the correct TTY using 

Ctrl + Alt + F2. 

"Ask Ubuntu"

✌️☘️😎💯

 

Comments

Popular Posts