Fix Ubuntu Booting Into TTY | Generated by AI
Question: Why does Ubuntu boot into a TTY (terminal) instead of the normal graphical window, and how can I switch back to the GUI?
Answer:
When Ubuntu boots into a TTY (text-only terminal like tty1) instead of the graphical desktop, it usually means the graphical system failed to start. This is typically related to the display manager, desktop environment, or graphics drivers.
π Quick Temporary Fix (Try First)
Press:
Ctrl + Alt + F2 (or F1βF7)
- One of these may bring you back to the graphical login screen.
- If you see GUI β just log in normally.
π§ Step 1: Try Starting GUI Manually
Login in the TTY, then run:
startx
If it works β problem is likely the display manager not starting automatically.
π§ Step 2: Restart Display Manager
Ubuntu uses a display manager like:
gdm3(default for GNOME)lightdm(older systems)
Try:
sudo systemctl restart gdm3
Or:
sudo systemctl restart lightdm
If GUI appears β issue is temporary.
π§ Step 3: Enable GUI at Boot
Check default target:
systemctl get-default
If it shows:
multi-user.target
π That means CLI-only mode.
Fix it:
sudo systemctl set-default graphical.target
sudo reboot
π§ Step 4: Reinstall Desktop Environment
Sometimes GNOME is broken:
sudo apt update
sudo apt install ubuntu-desktop
For minimal reinstall:
sudo apt install --reinstall gdm3
π§ Step 5: Check Disk Space (Very Common!)
df -h
If root (/) is full β GUI wonβt start.
Clean up:
sudo apt clean
sudo apt autoremove
π§ Step 6: Check GPU / Driver Issues
If you recently installed NVIDIA drivers, it might break GUI.
Try:
sudo ubuntu-drivers autoinstall
Or remove problematic drivers:
sudo apt purge nvidia*
π§ Step 7: Check Logs (Advanced)
journalctl -xe
or:
cat /var/log/Xorg.0.log | grep EE
Look for errors related to:
- display
- GPU
- gdm
π§ Common Causes Summary
| Cause | Explanation |
|---|---|
| GUI disabled | system boot target set to CLI |
| Display manager crash | gdm3/lightdm not starting |
| Full disk | no space β GUI fails |
| Broken update | packages partially installed |
| GPU driver issue | especially NVIDIA |
β Fastest Fix Path (Recommended Order)
Ctrl + Alt + F2~F7sudo systemctl restart gdm3systemctl get-defaultβ set to graphical- Check disk:
df -h - Reinstall:
sudo apt install ubuntu-desktop
If you want, paste what you see in the TTY (errors, login messages), and I can pinpoint the exact root cause quickly.