Running Linux in Headless Mode
12/19/25Less than 1 minute
Running Linux in Headless Mode
If you're connecting via SSH and don't need a graphical interface (GUI), you can switch your system to headless (text-only) mode to save resources. Follow these steps:
Check the current default target (runlevel):
systemctl get-defaultSet the default target to text mode (
multi-user.target):sudo systemctl set-default multi-user.targetDisable the graphical display manager:
(Choose the appropriate command based on your system.)- For systems using
gdm3(GNOME Display Manager):sudo systemctl disable gdm3 - For systems using
lightdm:sudo systemctl disable lightdm
- For systems using
Reboot your system for the changes to take effect:
sudo reboot
Note: After rebooting, your machine will start without launching the GUI, providing a pure command-line environment. To restore the GUI later, you can set the default target back to graphical.target and re-enable your display manager.