如何从命令行(Bash)和GUI检查和显示Ubuntu版本?

Ubuntu is very popular distributions which are used both personal and enterprise users. Ubuntu history starts in 2004 where Ubuntu 04.10 is released with the code name Warty Warthog and later version are released twice in a year in April and November. While using Ubuntu we may need to know the version which can be useful for application installation. In this tutorial, we will learn how to check and show the Ubuntu version from the command line (bash) or GUI.

Ubuntu是非常流行的发行版,可用于个人和企业用户。 Ubuntu的历史始于2004年,当时Ubuntu Warty Warthog的代号为Warty Warthog ,后来的版本在每年的4月和11月两次发布。 在使用Ubuntu时,我们可能需要了解可能对应用程序安装有用的版本。 在本教程中,我们将学习如何从命令行(bash)或GUI检查并显示Ubuntu版本。

Ubuntu版本和LTS (Ubuntu Versions and LTS)

Before starting this tutorial about Ubuntu version check here the list of the recent Ubuntu versions with the Code Name, Release, End of Support, End of Life dates. LTS versions are Long Term Support versions where they are enterprise-ready to support more than regular versions. We can see that LTS versions support dates a lot longer than normal ones.

在开始有关Ubuntu版本的本教程之前,请在此处检查具有代码名称,发行版,支持终止,生命周期终止日期的最新Ubuntu版本列表。 LTS版本是Long Term Support版本,在这些版本中,它们比标准版本更适合企业使用。 我们可以看到LTS版本支持的日期比正常日期更长。

Normal Ubuntu Releases
Normal Ubuntu Releases
普通的Ubuntu版本
Ubuntu Versions and LTS
Ubuntu Versions and LTS
Ubuntu版本和LTS

通过命令行检查并显示Ubuntu版本 (Check and Show Ubuntu Version Via Command Line)

The fastest and easiest way t check and show Ubuntu versions are used bash and commands via command line. We can use different commands and setting files in order to print the Ubuntu version. There may be more then these ways but we will look for the popular and best ways.

检查和显示Ubuntu版本的最快,最简单的方法是通过命令行使用bash和命令。 我们可以使用不同的命令和设置文件来打印Ubuntu版本。 这些方法可能不止这些,但我们将寻找流行和最佳的方法。

lsb_release命令 (lsb_release Command)

lsb_release is the command which is only designed to provide information about the ubuntu release version. Generally providing the -a option will print all information about Ubuntu. We can see from the output that information like Distributor ID , Description , Release and Codename is provided. We can see that this release is Ubuntu 18.10 and codenamed as Cosmic.

lsb_release是仅用于提供有关ubuntu发行版信息的命令。 通常,提供-a选项将打印有关Ubuntu的所有信息。 从输出中我们可以看到提供了诸如Distributor IDDescriptionReleaseCodename的信息。 我们可以看到此版本是Ubuntu 18.10 ,代号为Cosmic

$ lsb_release -a
lsb_release Command
lsb_release Command
lsb_release命令

neofetch命令(neofetch Command)

neofetch is an 3rd party command which can be installed with the following command. It is degisned to provide some colorful ways to print system releated information like Ubuntu version.

neofetch是第三方命令,可以与以下命令一起安装。 它旨在提供一些彩色方式来打印系统相关信息,例如Ubuntu版本。

$ sudo apt install neofetch

$ neofetch
neofetch Command
neofetch Command
neofetch命令

We can see that a lot of system information is provided like OS, Host, Uptime, Shell, CPU etc.

我们可以看到提供了许多系统信息,例如OS,主机,正常运行时间,Shell,CPU等。

LEARN MORE  What Is Ubuntu LTS and What is Difference From Regular Ubuntu Releases?
了解更多信息什么是Ubuntu LTS?与常规Ubuntu版本有何不同?

hostnamectl命令 (hostnamectl Command)

hostnamectl command is new generation command provided by most of the Linux distributions. It is created for to query and change system hostname and related settings where release version is one of them. We can print and display the Ubuntu version.

hostnamectl命令是大多数Linux发行版提供的新一代命令。 它用于查询和更改系统主机名以及相关设置,其中发行版就是其中之一。 我们可以打印并显示Ubuntu版本。

 $ hostnamectl
hostnamectl Command
hostnamectl Command
hostnamectl命令

We can see the Operating System line where the current Ubuntu release version is Ubuntu 18.10 .

我们可以看到“ Operating System行,其中当前的Ubuntu发行版是Ubuntu 18.10。

显示lsb发布文件 (Display lsb-release File)

The release information about the Ubuntu is store in the lsb-release file which is located in /etc. We can print the Ubuntu release version information with the cat command like below.

有关Ubuntu的发行信息存储在/etc中的lsb-release文件中。 我们可以使用如下cat命令来打印Ubuntu发行版本信息。

$ cat /etc/lsb-release
Display lsb-release File
Display lsb-release File
显示lsb发布文件

显示/ etc / issue文件(Display /etc/issue File)

The /etc/issue file also stores the Ubuntu version information. We can print it with the cat command like below.

/etc/issue文件还存储Ubuntu版本信息。 我们可以使用如下cat命令来打印它。

$ cat /etc/issue
Display /etc/issue File
Display /etc/issue File
显示/ etc / issue文件

显示/ etc / os-release文件(Display /etc/os-release File)

The os-release file also contains the Ubuntu release information. This file also provides information like a pretty name, version, support URL, version codename, etc. We will print it with the cat command like below.

os-release文件还包含Ubuntu版本信息。 该文件还提供了漂亮的名称,版本,支持URL,版本代号等信息。我们将使用如下所示的cat命令进行打印。

$ cat /etc/os-release
Display /etc/os-release File
Display /etc/os-release File
显示/ etc / os-release文件

通过GUI检查并显示Ubuntu版本(Check and Show Ubuntu Version Via GUI)

We will use the default Desktop Environment named Unity and created by Ubuntu. The first way is clicking to the right upper corner and settings like below.

我们将使用由Ubuntu创建的名为Unity的默认桌面环境。 第一种方法是单击右上角的设置,如下所示。

Then we will list the list of the settins. We will click to the Details which will open the detailed information about the system.

然后,我们将列出设置列表。 我们将单击“ Details ,这将打开有关系统的详细信息。

Unity Details
Unity Details
Unity细节

Here we can see the Ubuntu version is 18.10 and some other information like Memory, Processor, Graphics, Os Type, Disk.

在这里我们可以看到Ubuntu版本是18.10 ,还有一些其他信息,例如内存,处理器,图形,操作系统类型,磁盘。

Ubuntu Version Information GUI
Ubuntu Version Information GUI
Ubuntu版本信息GUI

从应用程序菜单 (From Application Menu)

We can also open from the Applications menu by clicking right down corner which will open the list of applications.

我们也可以从“应用程序”菜单中打开,方法是单击右下角,这将打开应用程序列表。

Unity Applications
Unity Applications
Unity应用

We will list the Settings applications like below and click it.

我们将如下所示列出“ Settings应用程序,然后单击它。

LEARN MORE  How To Get Ubuntu, Debian, Kali Release Version?
了解更多信息如何获取Ubuntu,Debian,Kali发行版本?
Open Settings
Open Settings
打开设置
Ubuntu Version Information GUI
Ubuntu Version Information GUI
Ubuntu版本信息GUI

翻译自: https://www.poftut.com/how-to-check-and-show-ubuntu-version-from-command-line-bash-and-gui/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值