OSTechNix published a quick tutorial about how to check if a GUI is installed in Linux.
How To Check If GUI Is Installed In Linux From Commandline
Do you want to detect if your Linux server has GUI? This guide explains various commandline methods to check if GUI is installed in Linux.
How To Check If GUI Is Installed In Linux From Commandline - OSTechNix