How to disable GUI on boot in 18.04 (Bionic Beaver)?
73,210
Solution 1
To disable GUI on boot, run:
sudo systemctl set-default multi-user.target
To enable GUI again issue the command:
sudo systemctl set-default graphical.target
To start Gnome session on a system without a current GUI just execute:
sudo systemctl start gdm3.service
Solution 2
To answer @nurp's comment
The screen is now pretty small in VirtualBox .
-
update your
/etc/default/grub
accordingly:GRUB_CMDLINE_LINUX_DEFAULT="nomodeset" GRUB_GFXMODE=1152x864x32 GRUB_GFXPAYLOAD_LINUX=1152x864x32
-
run
sudo update-grub
.-
nomodeset
so that the kernel does not attempt changing the resolution set by GRUB. -
GRUB_GFXPAYLOAD_LINUX
if this variable is set, it controls the video mode in which the Linux kernel starts up, replacing the ‘vga=’ boot option.
-
References
Solution 3
To shutdown gdm once started manually..
You simply execute:
sudo systemctl stop gdm3.service
Related videos on Youtube
Author by
ylluminate
Updated on September 18, 2022Comments
-
ylluminate over 1 year
It appears that
sudo systemctl disable gdm3 && sudo systemctl disable gdm
do not work in 18.04 to disable the windowing system at bootup. What's the method for doing this now?-
Admin almost 6 years
-
Admin almost 6 yearsLOL, you're right, I did it right on the system, but I simply typed it wrong here. Fixed.
-
-
nurp over 5 yearsIt works but there is one problem. The screen is now pretty small in VirtualBox
-
binarymelon over 5 yearsHow do you shutdown gdm once started manually?
-
binarymelon over 5 yearsThat's what I would have expected, but it doesn't appear to do anything.
-
michid almost 5 yearsDoesn't work for me: 'Failed to set default target: Unit file user-multi.target does not exist.'
-
Aido almost 5 years@michid That's because you flipped
user
andmulti
-
sh37211 almost 4 yearsOn my system, this produces the text 'The unit files have no installation config (WantedBy, RequiredBy, Also, Alias settings in the [Install] section, and DefaultInstance for template units). This means they are not meant to be enabled using systemctl.' So...?
-
huha almost 4 yearsAnd to query the current setting use
sudo systemctl get-default
-
Neurotransmitter over 3 yearsIn my case, I needed to find a way to disable GUI after I removed a graphics card from my server. This worked great.