How to Disable the GUI and Boot to Terminal in Ubuntu Linux

The Bloat of a Graphical Interface

If you install the standard desktop version of Ubuntu Linux to act as a home server, it will automatically boot into a heavy graphical user interface (like GNOME). While this makes initial setup easy, running a full desktop environment 24/7 consumes hundreds of megabytes of RAM and wastes valuable CPU cycles rendering a screen that no one is even looking at. If you intend to manage the server remotely via SSH, you should completely disable the graphical login manager (GDM) and force Ubuntu to boot directly into a lightweight, text-only terminal interface, freeing up all those system resources for your actual server applications.

Using systemctl to Change the Boot Target

Modern Ubuntu distributions use systemd to manage the boot process. You can change the default “target” state of the machine from a graphical interface to a multi-user text interface.

  1. Open your Terminal application or log into your server via SSH.
  2. To tell Ubuntu to boot into the command line by default, type the following command:
    sudo systemctl set-default multi-user.target
  3. Press Enter and provide your administrator password.

The terminal will output a message confirming that the default symlink has been removed and successfully re-linked to multi-user.target.

Rebooting and Reverting

The next time you reboot the machine (sudo reboot), the familiar graphical login screen will not appear. Instead, you will be greeted by a simple, black terminal prompt asking for your username. The server is now running perfectly with maximum hardware efficiency.

If you ever need to perform a task that requires a graphical interface, you do not need to undo your changes permanently. Simply log into the terminal and type startx to launch the desktop environment for that session only. Alternatively, if you want to permanently restore the graphical boot sequence, simply run: sudo systemctl set-default graphical.target.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.