Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 5008  / 1 Year ago, fri, december 30, 2022, 4:22:34

I installed ubuntu server 20.04 on a VM;
Then i tried $ startx but it said X could not be found, so i installed it;



$ sudo apt install xinit



Now every time it boots, i get the GNOME Gui (gdm3);


How do I exit the Gui, and back into a plain shell?


What I tried didn't work:



$ sudo service gdm3 stop



, this does exit the GUI into a black screen, no $ prompt;
(just a blinking cursor, looks hanged, so after 5 mins I just re-booted the VM)


More From » 20.04

 Answers
4

The text shell works in parallel with the GUI. Ubuntu (basically almost any Linux distro) uses 7 virtual terminals (VTs), accessible by pressing Ctrl+Alt+F1 to Ctrl+Alt+F7 (if you are on a text terminal, you can skip Ctrl and press Alt+F1 to Alt+F7 only).


Traditionally, VTs 1 to 6 were text terminals, while VT 7 was reserved for X. In new Ubuntu versions, however, this is different. GDM runs on VT 1. If you actually login to GNOME session via GDM, that session runs on VT 2. VT 7 displays some messages from system boot-up. So VT 3 to VT 6 can be used as text terminals.


So if you are on GDM or GNOME screen, pressing Ctrl+Alt+F3 to Ctrl+Alt+F6 should switch you to one of the text terminals available. Pressing Ctrl+Alt+F1 (or just Alt+F1) will bring you back to GDM screen, and pressing Ctrl+Alt+F2 (or Alt+F2) - to GNOME screen.


[#1120] Saturday, December 31, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
epypian

Total Points: 130
Total Questions: 111
Total Answers: 113

Location: Romania
Member since Mon, Jun 6, 2022
2 Years ago
epypian questions
Sat, Jul 31, 21, 18:35, 3 Years ago
Sun, Oct 24, 21, 23:28, 3 Years ago
Sun, Dec 26, 21, 12:08, 2 Years ago
Tue, May 9, 23, 21:23, 1 Year ago
Thu, Mar 16, 23, 10:31, 1 Year ago
;