Disable boot to GUI

What config file can I edit to disable booting to the GUI and just give me a standard terminal prompt?

Thanks!

hi,

you have 2 options (at least):

  1. modify the boot image and reflash it, you need to add “systemd.unit=multi-user.target” in the bootargs

  2. leave the boot image unmodified, boot once, and run at root shell:
    systemctl set-default -f multi-user.target
    Next boots will be without GUI

Note: to modify bootargs:

abootimg -i <boot .img file>

note the current bootargs in the previous output

abootimg -u <boot .img file> -c “cmdline=console=ttyMSM0,115200n8 root=/dev/disk/by-partlabel/rootfs rootwait rw systemd.unit=multi-user.target”

note that the command above modified the boot .img file. You can reflash it, and you will not boot into GUI anymore.

Make sure that the cmdline used in this example matches the one you had in the previous command… sometimes we change them…

That worked perfectly, thanks! I used the systemctl version.