How to Completely Disable the ‘GDM3’ GUI (Boot to Console) in Ubuntu Desktop

Ubuntu Desktop utilizes the GNOME Display Manager (GDM3) as its default graphical login screen and display manager. It handles user authentication and initializes the graphical desktop environment (Wayland or X11) upon a successful login. However, if you are repurposing an old desktop computer to act as a headless home server, a NAS (Network Attached Storage), or a dedicated Docker host, the entire graphical interface is a massive waste of system resources. Running GDM3 and the GNOME desktop consumes hundreds of megabytes of RAM and precious CPU cycles that could otherwise be dedicated to your server applications.

This guide explains how to completely disable the GDM3 display manager and force Ubuntu Desktop to boot directly into a multi-user text console (Command Line Interface), effectively converting it into a lightweight server.

Disable GDM3 via Systemctl Targets

The cleanest and most reversible way to disable the graphical interface in systemd-based Linux distributions is to change the default boot target. You are instructing the kernel to boot into the multi-user networking state, but to halt before initializing the graphical target.

  1. Open a terminal window in your current Ubuntu graphical session (or connect via SSH).
  2. Execute the following systemctl command to change the default boot target to the command-line interface:
    sudo systemctl set-default multi-user.target
  3. You will be prompted for your administrator password.
  4. The system will confirm the change by outputting a message indicating that the default.target symlink has been modified.
  5. Restart your computer:
    sudo reboot

Upon reboot, the Ubuntu splash screen will appear briefly, followed immediately by a stark, black TTY terminal login prompt. GDM3 will not load, and the GNOME desktop will remain completely dormant on the hard drive, freeing up massive amounts of RAM.

How to Temporarily Re-enable the GUI

The primary advantage of using the multi-user.target method is that the graphical binaries are not deleted. If you ever need to perform a task that strictly requires a web browser or a graphical utility, you can easily launch the desktop environment on demand.

  1. Log into the text console using your standard username and password.
  2. To launch the graphical interface for your current session, execute:
    sudo systemctl start gdm3
  3. The screen will flicker, and you will be presented with the standard Ubuntu graphical login screen.

Because you only started the service (rather than enabling it), the system will revert back to the text-only console the next time you reboot.

How to Permanently Restore Boot to GUI

If you decide to revert the machine back to a standard desktop workstation, you can easily restore the original boot behavior.

  1. From the terminal, execute the following command to reset the default target back to the graphical environment:
    sudo systemctl set-default graphical.target
  2. Reboot the system, and GDM3 will automatically launch during the startup sequence as it did originally.

Get the best tech tips delivered straight to your inbox.

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