I'm not sure what I did, but my computer now starts to a command line interface, rather than a GUI. How do I switch between GUI and command line startup?
3 Answers
Open a text-only virtual console by using the keyboard shortcut Ctrl+Alt+F3 (or Ctrl+Alt+F3-F6).
At the
login:
prompt type your username and press Enter.At the
Password:
prompt type your user password and press Enter.Now you are logged in to a virtual console, and you can run terminal commands from the console. For example, you can run terminal commands from the virtual console to repair your boot problem, but Ubuntu Server boots to a virtual console by default. 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
If you get stuck in a virtual console, press the keyboard shortcut Ctrl+Alt+F7 to exit from the console.
There is something not running properly that avoid the desktop to start properly, but first try this:
press Alt + F7
(or repeatedly Alt + Right
) and you will get back to the GUI session.
if it does not work, in the command line type
startx
I tried this solution and it worked:
sudo rm -Rf /var/lib/dpkg/lock
sudo apt dist-upgrade -y
sudo apt update
/etc/default/grub
or specifically the values ofGRUB_CMDLINE_LINUX_DEFAULT
andGRUB_CMDLINE_LINUX
? See “How do I get information from the logs on my computer when I only have access to the command line?” if you need help with that. Thanks.