1) install GNOME Desktop Yum groupinstall "X Windows systems" Yum groupinstall "GNOME Desktop Environment" KDE Desktop Yum groupinstall "X Windows systems" Yum groupinstall "k desktop environment" 2) by default, you can add desktop = "gnome" or desktop = "KDE" to/etc/sysconfig/desktop. 3) switch from gnome to KDE Desktop startkde.
--- 1. Set gnome or KDE as the default startup desktop environment. Method 1: Modify/etc/sysconfig/desktop and change the content after "desktop" to KDE or GNOME as needed. Method 2: Create ". xinitrc "file (note that there is a dot before the file name, which indicates that a hidden file is created). The file contains a line of startkde or gnome-session, select KDE or GNOME as needed. 2. Switch between GNOME and KDE ("#" is followed by the input command) 1. If you need to switch to Gnome: # switchdesk GNOME 2. If you need to switch to KDE: # switchdesk KDE