mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-26 21:30:55 +08:00
commit
7f30238e29
@ -1,111 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Here’s How to Find Out Which Desktop Environment You are Using)
|
||||
[#]: via: (https://itsfoss.com/find-desktop-environment/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
Here’s How to Find Out Which Desktop Environment You are Using
|
||||
======
|
||||
|
||||
If you are a new Linux user and seeking help in one of the Linux forums, you may be asked this question:
|
||||
|
||||
_**“Which desktop environment are you using?”**_
|
||||
|
||||
You have an idea about what a desktop environment is but how do you know which one are you using? I’ll tell you how to find it out. I’ll show the command line method first because that is applicable to [all kind of Linux distributions][1]. I’ll also show the graphical way of getting this information.
|
||||
|
||||
### Check which desktop environment you are using
|
||||
|
||||
![][2]
|
||||
|
||||
You can [use the echo command in Linux][3] to display the value of XDG_CURRENT_DESKTOP variable in the terminal.
|
||||
|
||||
Open the terminal and copy paste this command:
|
||||
|
||||
```
|
||||
echo $XDG_CURRENT_DESKTOP
|
||||
```
|
||||
|
||||
For example, it shows that I am using [GNOME desktop][4] in [Ubuntu 20.04][5]:
|
||||
|
||||
```
|
||||
[email protected]:~$ echo $XDG_CURRENT_DESKTOP
|
||||
ubuntu:GNOME
|
||||
```
|
||||
|
||||
While this command quickly tells you which desktop environment is being used, it doesn’t give any other information.
|
||||
|
||||
Knowing the version of desktop environment (also called DE) could be important in some cases. Each new version of a software brings new features or removes some. [GNOME 3.36][6] introduces a ‘Do Not Disturb’ option to toggle off all the desktop notifications.
|
||||
|
||||
Suppose you read about this new Do Not Disturb feature. You verify that you are using GNOME and yet you don’t see this option in your GNOME desktop. If you could check the GNOME desktop version you have installed on your system, that could make things clear for you.
|
||||
|
||||
I’ll show you the commands to check the desktop environment’s version first because you can use it in any Linux, running desktop environment.
|
||||
|
||||
### How to get desktop environment version
|
||||
|
||||
Unlike getting the name of desktop environment. getting its version number is not straightforward because there is no standard command or environment variable that could give this information.
|
||||
|
||||
One way to get the desktop environment information in Linux is by using a tool like [Screenfetch][7]. This [command line tool displays the logo of your Linux distribution in ascii format][8] along with a few basic system information. Desktop environment version is one of them.
|
||||
|
||||
In Ubuntu based distributions, you can install Screenfetch by [enabling Universe repository][9] and then using this command:
|
||||
|
||||
```
|
||||
sudo apt install screenfetch
|
||||
```
|
||||
|
||||
For other Linux distributions, please use your system’s package manager to install this program.
|
||||
|
||||
Once installed, simply type screenfetch in the terminal and it should show the desktop environment version along with other system information.
|
||||
|
||||
![Check Desktop Environment Version][10]
|
||||
|
||||
As you can see in the above image, my system is using GNOME 3.36.1 (basically GNOME 3.36). You can also [check the Linux kernel version][11] and other details here.
|
||||
|
||||
Please keep in mind that it is not necessary that Screenfetch will display the desktop environment version. I checked its source code and it has lots of if-else code to get the version information from a number of sources and parameters in various desktop environments. If it can find nothing on version, it just displays the DE name.
|
||||
|
||||
### Using GUI to check desktop environment version
|
||||
|
||||
Almost all desktop environments provide basic system details in their Settings-About section.
|
||||
|
||||
The one major problem is that most DEs look different and thus I cannot show the exact steps for each of them. I am going to show it for GNOME and I let you discover it in your desktop.
|
||||
|
||||
So, search for Settings in the menu (press Windows key and search):
|
||||
|
||||
![Search for Settings application][12]
|
||||
|
||||
In here, go to the bottom to find the About section. Click on it and you should have the desktop environment along with its version.
|
||||
|
||||
![Check Desktop Environment in Ubuntu][13]
|
||||
|
||||
As you can see, it shows that my system is using GNOME 3.36.
|
||||
|
||||
I hope you find this quick beginner tip useful. If you have questions or suggestions, please leave a comment below.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/find-desktop-environment/
|
||||
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/what-is-linux/
|
||||
[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/check-desktop-environment.jpg?ssl=1
|
||||
[3]: https://linuxhandbook.com/echo-command/
|
||||
[4]: https://www.gnome.org/
|
||||
[5]: https://itsfoss.com/ubuntu-20-04-release-features/
|
||||
[6]: https://itsfoss.com/gnome-3-36-release/
|
||||
[7]: https://github.com/KittyKatt/screenFetch
|
||||
[8]: https://itsfoss.com/display-linux-logo-in-ascii/
|
||||
[9]: https://itsfoss.com/ubuntu-repositories/
|
||||
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/check-desktop-environment-version.jpg?ssl=1
|
||||
[11]: https://itsfoss.com/find-which-kernel-version-is-running-in-ubuntu/
|
||||
[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/applications_menu_settings.jpg?ssl=1
|
||||
[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/check-desktop-environment-ubuntu.jpg?ssl=1
|
@ -0,0 +1,111 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Here’s How to Find Out Which Desktop Environment You are Using)
|
||||
[#]: via: (https://itsfoss.com/find-desktop-environment/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
这是找出你所使用的桌面环境的方法
|
||||
======
|
||||
|
||||
如果你是 Linux 新用户,并在一个 Linux 论坛中寻求帮助,那么你可能会被问以下问题:
|
||||
|
||||
_**“你使用的是哪个桌面环境?”**_
|
||||
|
||||
你知道什么是桌面环境,但你如何知道你使用的是哪一个?我会告诉你如何找到它。我将首先展示命令行方法,因为这适用于[各种 Linux 发行版][1]。我还将展示如何通过图形方式获得。
|
||||
|
||||
### 检查你使用的是哪个桌面环境
|
||||
|
||||
![][2]
|
||||
|
||||
你可以[在 Linux 中使用 echo 命令][3]在终端中显示 XDG_CURRENT_DESKTOP 变量的值。
|
||||
|
||||
打开终端并复制粘贴此命令:
|
||||
|
||||
```
|
||||
echo $XDG_CURRENT_DESKTOP
|
||||
```
|
||||
|
||||
例如,这表明我在 [Ubuntu 20.04][5] 中使用了 [GNOME 桌面][4]:
|
||||
|
||||
```
|
||||
[email protected]:~$ echo $XDG_CURRENT_DESKTOP
|
||||
ubuntu:GNOME
|
||||
```
|
||||
|
||||
尽管此命令可以快速告诉你正在使用哪个桌面环境,但它不会提供任何其他信息。
|
||||
|
||||
在某些情况下,了解桌面环境版本(也称为 DE)可能很重要。软件的每个新版本都会带来新功能或删除某些功能。[GNOME 3.36][6] 引入了“请勿打扰”选项,以关闭所有桌面通知。
|
||||
|
||||
假设你了解了此新的“请勿打扰”功能。你确认自己正在使用 GNOME,但是在 GNOME 桌面上看不到此选项。如果你可以检查系统上已安装的 GNOME 桌面版本,那么这会很清楚。
|
||||
|
||||
我将先向你展示命令检查桌面环境版本,因为你可以在任何运行桌面环境的 Linux 中使用它。
|
||||
|
||||
### 如何获取桌面环境版本
|
||||
|
||||
与获取桌面环境的名称不同。获取其版本号并不直接,因为它没有标准的命令或环境变量可以提供此信息。
|
||||
|
||||
在 Linux 中获取桌面环境信息的一种方法是使用 [Screenfetch][7] 之类的工具。此[命令行工具以 ascii 格式显示 Linux 发行版的 logo][8] 以及一些基本的系统信息。桌面环境版本就是其中之一。
|
||||
|
||||
在基于 Ubuntu 的发行版中,你可以通过[启用 Universe 仓库][9]安装 Screenfetch,然后使用以下命令:
|
||||
|
||||
```
|
||||
sudo apt install screenfetch
|
||||
```
|
||||
|
||||
对于其他 Linux 发行版,请使用系统的软件包管理器来安装此程序。
|
||||
|
||||
安装后,只需在终端中输入 screenfetch 即可,它应该显示桌面环境版本以及其他系统信息。
|
||||
|
||||
![Check Desktop Environment Version][10]
|
||||
|
||||
如上图所示,我的系统使用 GNOME 3.36.1(基本版本是 GNOME 3.36)。你也可以这样[检查 Linux 内核版本][11]和其他详细信息。
|
||||
|
||||
请记住,Screenfetch 不一定显示桌面环境版本。我查看了它的源码,它有许多 if-else 代码,可以从各种桌面环境中的许多源和参数获取版本信息。如果找不到任何版本,那么仅显示桌面环境名称。
|
||||
|
||||
### 使用 GUI 检查桌面环境版本
|
||||
|
||||
几乎所有桌面环境在其 “Settings-About” 部分中都提供了基本的系统详细信息。
|
||||
|
||||
一个主要问题是,大多数桌面环境看起来都不同,因此我无法展示每个桌面环境的确切步骤。我将展示 GNOME 的,让你在桌面上发现它。
|
||||
|
||||
在菜单中搜索 “Settings”(按 Windows 键并搜索):
|
||||
|
||||
![Search for Settings application][12]
|
||||
|
||||
在这里,找到底部的 “About” 部分。单击它,你应该就能看到桌面环境及其版本。
|
||||
|
||||
![Check Desktop Environment in Ubuntu][13]
|
||||
|
||||
如你所见,这表明我的系统正在使用 GNOME 3.36。
|
||||
|
||||
我希望这个快速入门技巧对你有所帮助。如果你有任何疑问或建议,请在下面发表评论。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/find-desktop-environment/
|
||||
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/what-is-linux/
|
||||
[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/check-desktop-environment.jpg?ssl=1
|
||||
[3]: https://linuxhandbook.com/echo-command/
|
||||
[4]: https://www.gnome.org/
|
||||
[5]: https://itsfoss.com/ubuntu-20-04-release-features/
|
||||
[6]: https://itsfoss.com/gnome-3-36-release/
|
||||
[7]: https://github.com/KittyKatt/screenFetch
|
||||
[8]: https://itsfoss.com/display-linux-logo-in-ascii/
|
||||
[9]: https://itsfoss.com/ubuntu-repositories/
|
||||
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/check-desktop-environment-version.jpg?ssl=1
|
||||
[11]: https://itsfoss.com/find-which-kernel-version-is-running-in-ubuntu/
|
||||
[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/applications_menu_settings.jpg?ssl=1
|
||||
[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/check-desktop-environment-ubuntu.jpg?ssl=1
|
Loading…
Reference in New Issue
Block a user