How to boot to console for Debian Stretch?

I’ve installed The Debian Stretch image to eMMC and it boots directly to a desktop. How can I make it boot to the console instead? A couple of ideas from searching haven’t helped.

$ systemctl set-default multi-user.target

…and rebooting has no effect.

$ systemctl status gdm3
Unit gdm3.service could not be found.

You are a bit too optimistic :wink: “GNOME Display Manager” is certainly not running well here.

I don’t know for “Debian”, but on Armbian this is done with

systemctl disable lightgdm
systemctl stop lightgdm

Try, perhaps it will also work.

Thanks, igorp@. Unfortunately, that doesn’t seem to be how they set up this distro either.

$ systemctl status lightgdm
Unit lightgdm.service could not be found.

Tried ‘gdm’ as well, just in case.

Got it. It was ‘lightdm’.

$ systemctl

…to list the services, where I found ‘lightdm’. Then

$ systemctl disable lightdm

…to disable it so it wouldn;t restart on later boots.

$ systemctl stop lightdm

…immediately stopped it, but it it didn’t drop into a console. Instead it just had a blinking, non-operational, underscore cursor. I SSH’d in to tell it reboot. Success! It rebooted into the text console.

I probably should have just rebooted instead of explicitly stopping lightdm. Now that I think about it, that blinking cursor probably was the console with an exited shell. I should have tried [alt] - [arrow] to change terminals, like you can after booting into the console.

Thanks again, igorp@

Oh, one more thing for other readers. Above I mentioned that I tried

$ systemctl set-default multi-user.target

That was still in place when I disabled lightdm. I assume it’s still necessary.

It can be checked with

$ systemctl get-default

So I believe the complete procedure to boot to console from the stock image is:

$ systemctl set-default multi-user.target
$ systemctl disable lightdm

Then reboot.