System

How to change boot into text console or GUI in Raspberry Pi

There are two ways to choose whether Raspberry Pi OS boots into console mode or GUI mode:

  1. Configure it through raspi-config by running:
# raspi-config

Select “System Options”.

Select “Boot / Auto Login”.

Choose Console / GUI boot mode.

Select Finish and reboot.

  1. Configure it through systemd.
    Run this command to boot into console mode.
# systemctl set-default multi-user.target

Output

Removed “/etc/systemd/system/default.target”.
Created symlink /etc/systemd/system/default.target → /lib/systemd/system/multi-user.target.

Run this command to boot into GUI mode.

# systemctl set-default graphical.target

Output

Removed “/etc/systemd/system/default.target”.
Created symlink /etc/systemd/system/default.target → /lib/systemd/system/graphical.target.

After running the command, reboot the machine with:

# reboot
EOF.← Back to articles