I used to achieve the same result by removing or disabling the lightdm-gtk-greeter
package.
Though it’s probably better to wait 'til someone more knowledgeable chimes in.
I think that irrespective of the desktop environment the method is roughly the same:
https://superuser.com/questions/1106174/boot-ubuntu-16-04-into-command-line-do-not-start-gui