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 .

  1. update your /etc/default/grub accordingly:

    GRUB_CMDLINE_LINUX_DEFAULT="nomodeset"
    GRUB_GFXMODE=1152x864x32
    GRUB_GFXPAYLOAD_LINUX=1152x864x32
    
  2. 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
Share:
73,210

Related videos on Youtube

ylluminate
Author by

ylluminate

Updated on September 18, 2022

Comments

  • ylluminate
    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
      Admin almost 6 years
      You messed up sysctl with systemctl. Please read their man-pages (man 8 sysctl and man systemctl).
    • Admin
      Admin almost 6 years
      LOL, you're right, I did it right on the system, but I simply typed it wrong here. Fixed.
  • nurp
    nurp over 5 years
    It works but there is one problem. The screen is now pretty small in VirtualBox
  • binarymelon
    binarymelon over 5 years
    How do you shutdown gdm once started manually?
  • binarymelon
    binarymelon over 5 years
    That's what I would have expected, but it doesn't appear to do anything.
  • michid
    michid almost 5 years
    Doesn't work for me: 'Failed to set default target: Unit file user-multi.target does not exist.'
  • Aido
    Aido almost 5 years
    @michid That's because you flipped user and multi
  • sh37211
    sh37211 almost 4 years
    On 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
    huha almost 4 years
    And to query the current setting use sudo systemctl get-default
  • Neurotransmitter
    Neurotransmitter over 3 years
    In my case, I needed to find a way to disable GUI after I removed a graphics card from my server. This worked great.