I configured a web mapping service on a debian system in VirtualBox and used to GUI to make it easier for me as a linux newbie. But now the system is done and working and shall be moved to a VM on our cloud service for customer use. There the GUI is obviously not needed and will only consume unnecessary resources.
I tried to find out, which config file to edit or which command to issue to make Debian start headless. But my search results are surprisingly bare - I either find instructions for headless installtion or for way more specific cases than mine.
What I found was this:
systemctl disable lightdm
But it came with warnings, that I might not be able to re-enable it, if needed.
So I came here to ask more experienced users if
a) this is the right command for what I want and
b) if there is a way to revert this, should I ever need it
Any help for a linux starter would be very appreciated!