Is there any way to temporarily disable GUI (X server) when booting an Ubuntu 16.04 LTS installation?

There are various guides advising to add text option onto the line GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub or directly on the linux line in GRUB. These methods work well in Ubuntu 14.04 LTS but I always end up in LightDM when trying them in 16.04 LTS.


To boot Ubuntu 16.04 Desktop without X one time, add systemd.unit=multi-user.target to the linux command line in GRUB.

To make this the default, use

sudo systemctl set-default multi-user.target

To return to default booting into X, use

sudo systemctl set-default graphical.target

To see the current default target,

sudo systemctl get-default
  • Yes, this one works! However, I am pretty sure I won’t remember this method as easily as the old one…
    – Melebius
    Jan 10 '17 at 13:42
  • 7
    @Melebius: How to remember: Ubuntu now uses systemd as the init system. Systemd has a notion of target units, some of which correspond to the old-school bootlevels. When booting, systemd has the goal to achieve default.target, which can be symlinked to one of two: multi-user.target (system fully up, no graphics) and graphical.target (system fully up, with graphics).
    – AlexP
    Jan 10 '17 at 13:46
  • 1
    For those who don't know how to edit GRUB command: press Shift during boot, and press e to edit selected boot command.
    – longbkit
    Sep 20 '17 at 1:40
  • Thanks for your instruction, in my case I have to modify grub configuration as well. sudo vi /etc/default/grub Comment out GRUB_CMD_LINE_LINUX_DEFAULT line by adding prefix #, modify GRUB_CMD_LINE_LINUX to "text", and uncomment GRUB_TERMINAL=console. Then save and sudo update-grub
    – longbkit
    Sep 20 '17 at 2:22
  • @longbkit That’s the old option (without systemd) that I mentioned in the question.
    – Melebius
    Jan 25 '18 at 15:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.