How to disable (or enable) GUI on boot in Ubuntu 21.04 (Hirsute Hippo) (works on all systemd Linux)

Andy

Administrator
Creative Team
User ID
1
Joined
7 Jan 2019
Messages
1,111
Reaction score
56
Points
48
The following article will show you how to disable the GUI on boot in Ubuntu 21.04 (Hirsute Hippo) Desktop Linux

Areas covered:
  • How to disable GUI on boot
  • How to enable GUI on boot
  • How to start GUI from the console
  1. The following command will disable GUI on boot, and therefore upon the system reboot, the system will boot into multi-user target (default normal Linux console):
    Bash:
    $ sudo systemctl set-default multi-user
  2. Logout from the X-session or simply reboot your system to exit the GUI.
    Bash:
    $ gnome-session-quit
To enable back the GUI to start on boot:
Bash:
$ sudo systemctl set-default graphical

To start the GUI manually from the console:
Bash:
$ startx
For GNOME GUI installations using GDM as the default display manager, you can start GUI from a command line by executing the command below:
Bash:
$ sudo systemctl start gdm3
 
I have default target multi-user but still it boots to GUI.
 
 Short URL:
Back
Top