That's easy. All you need to do is edit your .xinitrc and enable command line login.
WARNING: The following steps tell you to do "exactly" what you are asking. You will not be able to move any windows with your mouse because there won't be a window manager running. I advise you to at least have a window manager running so that you can move the windows or at least have a tiled window manager such as i3.
If you still wish to proceed despite this warning, follow these steps:
- Install xterm:
sudo apt install xterm
- Open/Edit ~/.xinitrc and put
xterm at the bottom and save the file
- Disable GUI:
sudo systemctl set-default multi-user.target
- Restart and the system should now start in command line mode.
- Log in and type
startx and X will start with xterm running
- Launch any program you want from there. To exit, type
exit.
- To re-enable GUI mode, type:
sudo systemctl set-default graphical.target
Special note: You may need to click inside the xterm window with your left mouse button before you are able to type. Another way to exit is via pressing simultaneously Ctrl+Alt+Backspace.