Set permanently GUI mode or text mode for the Linux OS
Check the default setting for boot mode or target:
1. Open the terminal and switch to root user or use sudo command:
su root
2. check the boot target or mode:
sudo systemctl get-default
Convert permanently command prompt to GUI in Linux:
1. Open terminal and switch to root user or use sudo command
su root
2. Change boot mode to GUI with following command:
sudo systemctl set-default graphical.target
3. Reboot the server
sudo reboot

Convert back to text or command shell mode from GUI:
1. Open terminal and switch to root user or use sudo command
su root
2. Change boot mode to GUI with following command:
sudo systemctl set-default multi-user.target
3. Reboot the server
sudo reboot