On an Ubuntu installation that uses systemd, set multi-user.target as the default to request a non-graphical boot. Changing the default target affects later boots; switching targets immediately is a separate operation that can terminate your graphical session. Check the current setup and keep a way to recover before changing it.
Contents
Inspect before changing anything
systemctl get-default
systemctl status display-manager.service
cat /proc/cmdline
These commands inspect the default target, the display-manager service and current kernel parameters. They do not install a desktop or prove that every boot setting uses its default. If a command reports that the service does not exist, investigate the installation rather than substituting an arbitrary display-manager name.
For a text console without stopping the desktop, try a virtual terminal such as Ctrl + Alt + F3. The graphical session's terminal number varies. Switching terminals alone does not necessarily stop the GUI or release its resources.
Make later boots non-graphical
After saving work and confirming you have console or appropriate administrative access, use:
sudo systemctl set-default multi-user.target
systemctl get-default
The reported default should be multi-user.target. Reboot when you are prepared for the new login environment. This changes a systemd target selection; it does not uninstall the desktop. The distinction between setting the default and starting or isolating a target is documented in systemctl's manual.
Select text mode for one boot
Where the system's bootloader permits authorized editing of an entry, add systemd.unit=multi-user.target to that entry's kernel command line for a one-time boot. A temporary menu edit is different from writing a persistent bootloader configuration. Consult the systemd kernel-command-line documentation and the bootloader documentation for your installation.
GRUB_TERMINAL=console concerns the bootloader's own interface, not whether Ubuntu later starts its desktop. The old answer blurred that distinction and treated a bare text option as a general current solution. Use the explicit documented target parameter instead of assuming that every historical boot argument has the same effect.
Stopping the graphical environment now
sudo systemctl isolate multi-user.target
Save work before this operation. Isolation starts the selected target and its dependencies and stops units outside that target unless they are exempt. The systemctl manual warns that this can stop the graphical environment or even the terminal you are using. It is not equivalent to simply opening a text console, and it should not be an unattended first troubleshooting step on a remote machine.
Return to a graphical boot
sudo systemctl set-default graphical.target
systemctl get-default
sudo systemctl start graphical.target
The first command changes the future default. The last requests the graphical target for the current session. A desktop and a functioning, unmasked display manager still need to be installed. If you also changed a persistent kernel parameter, disabled services or removed packages, reverse those separate changes deliberately. Changing the target alone cannot repair every missing component.
If the result differs from expectations
- Read
/proc/cmdlinefor a target override that differs from the default. - Inspect the display-manager status and relevant journal errors rather than repeatedly enabling a guessed service name.
- Keep network and firewall configuration separate. This task does not require changing SSH access, firewall rules or passwords.
- Measure actual resource use if performance is the goal. A text login is not a measured speed or security guarantee.
This procedure was checked against systemd documentation; it was not executed on your Ubuntu installation. It applies to systemd-based systems and is not a substitute for checking the boot and recovery arrangements of the particular machine.
Article history
Sources checked October 23, 2026
- Corrected GRUB output versus systemd targets, one-time boot syntax and actual display-manager inspection.
- Added reversible default/graphical recovery and isolate/session warnings; omitted unrelated destructive and firewall steps. Commands were not executed on a user system.
