ENV:
[root@Fedora32 ~]#uname -r
5.6.19-300.fc32.x86_64
[root@Fedora32 ~]#cat /etc/redhat-release
Fedora release 32 (Thirty Two)
现在一起使用的linux Fedora32系统,系统默认采用gnome桌面环境(官方是这样介绍的),但是自己使用了很长时间后想自己查看自己使用的是gnome还是kde,或者是xfce。及其版本号是多少。
方法一:桌面直接查看(和查看windows属性类似)
1.点击最右上角的向下三角,打开下拉菜单
2.选择Settings设置,并在打开的窗口中最左侧找到最下面一项About
settings这个窗口中可以查看系统大部分的设置内容,如:网络,桌面背景,声音,电源,分辨率,用户,键盘,区域,时间等。有兴趣的可以自行查看。
3.从about中可以查看电脑和系统的信息,内存,cpu等,下面的 “GNOME Version”就是这里要找的桌面信息,采用的3.36.3版的gnome桌面环境。
方法二:terminal终端(终端查看是可以很多命令查看的)
A:rpm -qa |grep gnome-desk 或 rpm -qa |grep kde-desk(没使用过kde环境,这个不知道是不是可行)
对于使用linux的用户来说,用命令终端是常态,还是建议使用这个方法
[root@Fedora32 ~]#rpm -qa |grep gnome-desk
gnome-desktop3-3.36.3.1-1.fc32.x86_64
如果不知道gnome-desk,也可以直接搜索gnome,只是内容太多,所有与桌面有关的内容基本都包含了,需要在很多内容中找,不建议使用这种方法。
[root@Fedora32 ~]#rpm -qa |grep gnome
gnome-abrt-1.3.5-1.fc32.x86_64
gnome-backgrounds-3.36.0-1.fc32.noarch
gnome-shell-extension-common-3.36.2-1.fc32.noarch
f30-backgrounds-gnome-30.1.2-3.fc32.noarch
gnome-weather-3.36.1-1.fc32.noarch
gnome-desktop3-3.36.3.1-1.fc32.x86_64
gnome-control-center-3.36.3-1.fc32.x86_64
gnome-autoar-0.2.4-2.fc32.x86_64
NetworkManager-openvpn-gnome-1.8.12-1.fc32.x86_64
gnome-control-center-filesystem-3.36.3-1.fc32.noarch
gnome-shell-extension-apps-menu-3.36.2-1.fc32.noarch
gnome-menus-3.36.0-1.fc32.x86_64
gnome-keyring-pam-3.36.0-1.fc32.x86_64
NetworkManager-pptp-gnome-1.2.8-1.fc32.3.x86_64
gnome-online-miners-3.34.0-2.fc32.x86_64
gnome-shell-3.36.3-3.fc32.x86_64
gnome-bluetooth-libs-3.34.1-1.fc32.x86_64
gnome-shell-extension-window-list-3.36.2-1.fc32.noarch
desktop-backgrounds-gnome-32.0.0-3.fc32.noarch
gnome-contacts-3.36.1-1.fc32.x86_64
f32-backgrounds-gnome-32.2.2-1.fc32.noarch
chrome-gnome-shell-10.1-7.fc32.x86_64
NetworkManager-vpnc-gnome-1.2.6-4.fc32.x86_64
gnome-disk-utility-3.36.1-1.fc32.x86_64
gnome-themes-extra-3.28-7.fc32.x86_64
libgnomekbd-3.26.1-3.fc32.x86_64
gnome-terminal-3.36.1.1-1.fc32.x86_64
f31-backgrounds-gnome-31.0.4-2.fc32.noarch
gnome-system-monitor-3.36.1-1.fc32.x86_64
libobasis6.1-gnome-integration-6.1.3.2-2.x86_64
gnome-session-xsession-3.36.0-2.fc32.x86_64
gnome-getting-started-docs-3.36.2-1.fc32.noarch
gnome-photos-3.34.2-1.fc32.x86_64
gnome-clocks-3.36.2-1.fc32.x86_64
gnome-logs-3.36.0-1.fc32.x86_64
gnome-session-3.36.0-2.fc32.x86_64
f29-backgrounds-gnome-29.1.3-4.fc32.noarch
gnome-shell-extension-background-logo-3.36.0-1.fc32.noarch
gnome-screenshot-3.36.0-1.fc32.x86_64
gnome-video-effects-0.5.0-2.fc32.noarch
NetworkManager-ssh-gnome-1.2.11-1.fc32.x86_64
gnome-software-3.36.1-1.fc32.x86_64
gnome-calendar-3.36.2-1.fc32.x86_64
gnome-characters-3.34.0-2.fc32.x86_64
gnome-remote-desktop-0.1.8-2.fc32.x86_64
gnome-initial-setup-3.36.3-1.fc32.x86_64
gnome-icon-theme-3.12.0-13.fc32.noarch
gnome-shell-extension-horizontal-workspaces-3.36.2-1.fc32.noarch
gnome-maps-3.36.2-1.fc32.x86_64
gnome-font-viewer-3.34.0-3.fc32.x86_64
pinentry-gnome3-1.1.0-7.fc32.x86_64
gnome-session-wayland-session-3.36.0-2.fc32.x86_64
gnome-user-share-3.34.0-2.fc32.x86_64
gnome-user-docs-3.36.2-1.fc32.noarch
gnome-keyring-3.36.0-1.fc32.x86_64
gnome-terminal-nautilus-3.36.1.1-1.fc32.x86_64
fros-gnome-1.1-22.fc32.noarch
gnome-shell-extension-launch-new-instance-3.36.2-1.fc32.noarch
NetworkManager-openconnect-gnome-1.2.6-3.fc32.x86_64
gnome-online-accounts-3.36.0-1.fc32.x86_64
gnome-bluetooth-3.34.1-1.fc32.x86_64
qgnomeplatform-0.6.1-2.fc32.x86_64
gnome-color-manager-3.36.0-1.fc32.x86_64
gnome-settings-daemon-3.36.1-1.fc32.x86_64
gnome-shell-extension-places-menu-3.36.2-1.fc32.noarch
gnome-calculator-3.36.0-1.fc32.x86_64
gnome-classic-session-3.36.2-1.fc32.noarch
B:dnf grouplist | more(没看到版本号,不推荐)
在linux系统安装时,基本上所有的版本都是采用的组件模块化安装方式。在Installed Groups:中可以看到当前安装的是gnome,但是并没有显示版本号。
[root@Fedora32 ~]#dnf grouplist | more
Last metadata expiration check: 1:03:07 ago on Wed 01 Jul 2020 04:54:51 PM CST.
Available Environment Groups:
Fedora Custom Operating System
Minimal Install
Fedora Server Edition
Fedora Workstation
Fedora Cloud Server
KDE Plasma Workspaces
Xfce Desktop
LXDE Desktop
LXQt Desktop
Cinnamon Desktop
MATE Desktop
Sugar Desktop Environment
Deepin Desktop
Development and Creative Workstation
Web Server
Infrastructure Server
Basic Desktop
Installed Groups:
LibreOffice
GNOME Desktop Environment
Fonts
Hardware Support
Available Groups:
3D Printing
Administration Tools
Audio Production
Authoring and Publishing
Books and Guides
C Development Tools and Libraries
Cloud Infrastructure
Cloud Management Tools
Compiz
Container Management
D Development Tools and Libraries
Design Suite
Development Tools
Domain Membership
Fedora Eclipse
Editors
Educational Software
Electronic Lab
Engineering and Scientific
FreeIPA Server
Headless Management
MATE Applications
Medical Applications
Milkymist
Network Servers
Neuron Modelling Simulators
Office/Productivity
Python Classroom
Python Science
Robotics
RPM Development Tools
Security Lab
Text-based Internet
Window Managers
Deepin Desktop Environment
Graphical Internet
KDE (K Desktop Environment)
Games and Entertainment
Sound and Video
System Tools
C.环境变量查看(出错,不建议)
但是我使用的时候没有显示,第一个没有输出,第二个输入的是空值,不知道哪里的问题,估计是参数改变了
[root@Fedora32 ~]#env | grep DESKTOP_SESSION
[root@Fedora32 ~]#echo $GDMSESSION
[root@Fedora32 ~]#
D.知道gnome环境,查看版本号gnome-about(出错了,不建议)
但是默认的系统中并没有安装这个命令,安装看下吧
[root@Fedora32 ~]#gnome-about
bash: gnome-about: command not found...
Install package 'gnome-desktop' to provide command 'gnome-about'? [N/y] y
* Waiting in queue...
The following packages have to be installed:
gnome-desktop-2.32.0-26.fc32.x86_64 Shared code among gnome-panel, gnome-session, nautilus, etc
Proceed with changes? [N/y] y
* Waiting in queue...
* Waiting for authentication...
* Waiting in queue...
* Downloading packages...
* Requesting data...
* Testing changes...
* Installing packages...
命令结束查看桌面的信息窗口
现在看到了,但是这个Version不对啊,有些明白为什么系统没有默认安装这个命令了,
方法二中的C.D方法是网上找的,可能是系统不同,也可能是版本有所改变导致不能正确查看。
但是方法一和方法二中的A方法这两种是准确无误的。方法一是直接桌面显示的,方法二的A是直接查看的安装包信息,这两种方法出错的几率是相当小的,所以还是推荐使用这两种方法。