Ubuntu – How to disable X at boot time so that the system boots in text mode


Is it possible to disable X at boot time? I'm setting up a server so it would be nice if it wouldn't load the graphical interface every time I boot.

Best Answer

  • Edit /etc/default/grub with your favourite editor, e.g. nano:

    sudo nano /etc/default/grub

    Find this line:


    Change it to:


    Update GRUB:

    sudo update-grub

    For systems that use systemd

    This is an additional step for systemd releases, e.g. Ubuntu 15.04, the steps above for grub are still necessary.

    You need to tell systemd to not load the graphical login manager:

    sudo systemctl enable multi-user.target --force
    sudo systemctl set-default multi-user.target

    You will still be able to use X by typing startx after you logged in.