The Heavy Desktop Environment
If you installed the standard desktop version of Ubuntu Linux on an older laptop or a low-powered virtual machine, the graphical user interface (GUI)—typically GNOME—consumes a massive amount of system RAM and CPU cycles just to draw the windows and icons. If you decide to repurpose this machine into a dedicated file server, a Pi-hole DNS sinkhole, or a web server, rendering that desktop environment is a complete waste of hardware resources. You don’t need to reinstall the entire “Ubuntu Server” operating system from scratch; you can simply tell the system initialization manager to stop loading the graphics drivers, forcing the machine to boot directly into a lightweight, text-only terminal.
Using systemctl to Change the Boot Target
Modern Ubuntu uses systemd to manage how the computer starts up. You can change the default “target” from graphical to multi-user (which means command-line only).
- Open your Terminal application (Ctrl + Alt + T) or log into your server via SSH.
- To tell the system to boot to the command line permanently, type the following command:
sudo systemctl set-default multi-user.target- Press Enter and provide your administrator password.
Testing the Change
The terminal will instantly return a message confirming that the default symbolic link has been changed. To apply the change, you must restart the machine (sudo reboot). When the computer turns back on, it will completely skip the graphical login screen, presenting you with a stark black screen and a blinking cursor asking for your username. If you ever need the graphical interface back temporarily, you can simply type startx or sudo systemctl isolate graphical.target. To make the GUI the permanent default again, type sudo systemctl set-default graphical.target.