To modify the desktop environment that Ubuntu starts by default:
Whether Ubuntu starts the graphical interface depends on the settings of the Default-display-manager.
Vi/etc/x11/default-display-manager
Value is/USR/SBIN/GDM, enter the GDM graphical interface
A value of/USR/SBIN/LIGHTDM enters the LIGHTDM graphical interface.
Value is False, enter the console
In the graphical interface: Press ALT+CTRL+F1 to switch to the character interface
In the character interface: Press ALT+CTRL+F7 to switch to the graphical interface
If you want Ubuntu to boot to command prompt each time, you can enter the following command:
$echo "false" | sudo tee/etc/x11/default-display-manager
When the next boot, it will start in command line mode (text mode, character interface login)
If you want to change back to the GUI start (X Windows boot), you can enter:
$echo "/USR/SBIN/GDM" | sudo tee/etc/x11/default-display-manager
If the UBUNTN is started in command-line mode, the character terminal wants to return to the graphical interface with the following command:
$startx
or press ALT+CTRL+F7 to switch to the graphical interface
Ubuntu Desktop environment Configuration and switching