CentOS删除桌面环境
公司有几台虚拟机安装的是CentOS7的桌面环境,平时也是用终端访问,于是在服务器卡住需要重启时,顺便就把桌面环境给卸载了;测试了好多方法均不成功,最终找到了可行的方式,以此记录;
[root@yunyue01 ~]# yum list installed |grep -Pi '(gnome)' # 找到已安装的跟gnome相关的软件 gnome-abrt.x86_64 0.3.4-9.el7 @anaconda gnome-bluetooth.x86_64 1:3.28.2-1.el7 @anaconda gnome-bluetooth-libs.x86_64 1:3.28.2-1.el7 @anaconda gnome-desktop3.x86_64 3.28.2-2.el7 @anaconda gnome-icon-theme.noarch 3.12.0-1.el7 @anaconda gnome-keyring.x86_64 3.28.2-1.el7 @anaconda gnome-keyring-pam.x86_64 3.28.2-1.el7 @anaconda gnome-online-accounts.x86_64 3.28.2-1.el7 @anaconda gnome-python2.x86_64 2.28.1-14.el7 @anaconda gnome-python2-canvas.x86_64 2.28.1-14.el7 @anaconda gnome-session.x86_64 3.28.1-8.el7 @anaconda gnome-settings-daemon.x86_64 3.28.1-8.el7 @anaconda gnome-shell.x86_64 3.28.3-30.el7 @anaconda gnome-themes-standard.x86_64 3.28-2.el7 @anaconda libgnome-keyring.x86_64 3.12.0-1.el7 @anaconda libgnomecanvas.x86_64 2.30.3-8.el7 @anaconda libgnomekbd.x86_64 3.26.0-3.el7 @anaconda [root@yunyue01 ~]# yum remove gnome-desktop3.x86_64 -y # 卸载gnome-desktop桌面环境 ... ... 删除: gnome-desktop3.x86_64 0:3.28.2-2.el7 作为依赖被删除: cheese-libs.x86_64 2:3.28.0-1.el7 control-center.x86_64 1:3.28.1-7.el7 gdm.x86_64 1:3.28.2-23.el7 gnome-session.x86_64 0:3.28.1-8.el7 gnome-settings-daemon.x86_64 0:3.28.1-8.el7 gnome-shell.x86_64 0:3.28.3-30.el7 mutter.x86_64 0:3.28.3-26.el7 pulseaudio-gdm-hooks.x86_64 0:10.0-5.el7 完毕! [root@yunyue01 ~]# reboot # 重启设备让其生效