如何查看 Linux Mint 版本号和代号
Mint 版本
Linux Mint 每两年发布一次主版本（如 Mint 19），每六个月左右发布一次次版本（如 Mint 19.1、19.2 等）。 你可以自己升级 Linux Mint 版本，而次版本也会自动更新。


在所有这些版本中，你可能想知道你正在使用的是哪个版本。了解 Linux Mint 版本号可以帮助你确定某个特定软件是否适用于你的系统，或者检查你的系统是否已达到使用寿命。


你可能需要 Linux Mint 版本号有多种原因，你也有多种方法可以获取此信息。让我向你展示用图形和命令行的方式获取 Mint 版本信息。


* [使用命令行查看 Linux Mint 版本信息](tmp.pL5Hg3N6Qt#terminal)
* [使用 GUI（图形用户界面）查看 Linux Mint 版本信息](tmp.pL5Hg3N6Qt#GUI)


### 使用终端查看 Linux Mint 版本号的方法


![](/data/attachment/album/201909/19/103049kgb34obr4sggy06l.png)


我将介绍几种使用非常简单的命令查看 Linux Mint 版本号和代号的方法。 你可以从 “菜单” 中打开终端，或按 `CTRL+ALT+T`（默认热键）打开。


本文中的最后两个命令还会输出你当前的 Linux Mint 版本所基于的 Ubuntu 版本。


#### 1、/etc/issue


从最简单的 CLI 方法开始，你可以打印出 `/etc/issue` 的内容来检查你的版本号和代号：



```
[email protected]:~$ cat /etc/issue
Linux Mint 19.2 Tina \n \l
```

#### 2、hostnamectl


![hostnamectl](/data/attachment/album/201909/19/103050nsqsf8jjrl3fi8ld.jpg)


这一个命令（`hostnamectl`）打印的信息几乎与“系统信息”中的信息相同。 你可以看到你的操作系统（带有版本号）以及你的内核版本。


#### 3、lsb\_release


`lsb_release` 是一个非常简单的 Linux 实用程序，用于查看有关你的发行版本的基本信息：



```
[email protected]:~$ lsb_release -a
No LSB modules are available.
Distributor ID:    LinuxMint
Description:    Linux Mint 19.2 Tina
Release:    19.2
Codename:    tina
```

**注：** 我使用 `–a` 标签打印所有参数, 但你也可以使用 `-s` 作为简写格式，`-d` 用于描述等 （用 `man lsb_release` 查看所有选项）


#### 4、/etc/linuxmint/info


![/etc/linuxmint/info](/data/attachment/album/201909/19/103051hn7kpaina2v32k3r.jpg)


这不是命令，而是 Linux Mint 系统上的文件。只需使用 `cat` 命令将其内容打印到终端，然后查看你的版本号和代号。


#### 5、使用 /etc/os-release 命令也可以获取到 Ubuntu 代号


![/etc/os-release](/data/attachment/album/201909/19/103054dvablfs9mmvknyg1.jpg)


Linux Mint 基于 Ubuntu。每个 Linux Mint 版本都基于不同的 Ubuntu 版本。了解你的 Linux Mint 版本所基于的 Ubuntu 版本有助你在必须要使用 Ubuntu 版本号的情况下使用（比如你需要在 [Linux Mint 中安装最新的 Virtual Box](https://itsfoss.com/install-virtualbox-ubuntu/)添加仓库时）。


`os-release` 则是另一个类似于 `info` 的文件，向你展示 Linux Mint 所基于的 Ubuntu 版本代号。


#### 6、使用 /etc/upstream-release/lsb-release 只获取 Ubuntu 的基本信息


如果你只想要查看有关 Ubuntu 的基本信息，请输出 `/etc/upstream-release/lsb-release`：



```
[email protected]:~$ cat /etc/upstream-release/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04 LTS"
```

特别提示：[你可以使用 uname 命令查看 Linux 内核版本](https://itsfoss.com/find-which-kernel-version-is-running-in-ubuntu/)。



```
[email protected]:~$ uname -r
4.15.0-54-generic
```

**注：** `-r` 代表 release，你可以使用 `man uname` 查看其他信息。


### 使用 GUI 查看 Linux Mint 版本信息


如果你对终端和命令行不满意，可以使用图形方法。如你所料，这个非常明了。


打开“菜单” (左下角)，然后转到“偏好设置 > 系统信息”：


![Linux Mint 菜单](/data/attachment/album/201909/19/103055vag6cx6ihzc6lihg.jpg)


或者，在菜单中，你可以搜索“System Info”：


![Menu Search System Info](/data/attachment/album/201909/19/103056ghtppyht0adhiptt.jpg)


在这里，你可以看到你的操作系统（包括版本号），内核和桌面环境的版本号：


![System Info](/data/attachment/album/201909/19/103057gun3aadnrrrrahrn.png)


### 总结


我已经介绍了一些不同的方法，用这些方法你可以快速查看你正在使用的 Linux Mint 的版本和代号（以及所基于的 Ubuntu 版本和内核）。我希望这个初学者教程对你有所帮助。请在评论中告诉我们你最喜欢哪个方法！




---


via: <https://itsfoss.com/check-linux-mint-version/>


作者：[Sergiu](https://itsfoss.com/author/sergiu/) 选题：[lujun9972](https://github.com/lujun9972) 译者：[Morisun029](https://github.com/Morisun029) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
![Warp Terminal](/assets/images/warp-terminal.webp)


![Warp Terminal](/assets/images/warp-terminal.webp)

Linux Mint has a major release (like Mint 19) every two years and minor releases (like Mint 19.1, 19.2 etc) every six months or so. You can upgrade Linux Mint version on your own or it may get automatically update for the minor releases.

Between all these release, you may wonder which Linux Mint version you are using. Knowing the version number is also helpful in determining whether a particular software is available for your system or if your system has reached end of life.

There could be a number of reasons why you might require the Linux Mint version number and there are various ways you can obtain this information. Let me show you both graphical and command line ways to get the Mint release information.

## Ways to check Linux Mint version number using terminal

I’ll go over several ways you can check your Linux Mint version number and codename using very simple commands. You can open up a **terminal **from the **Menu** or by pressing **CTRL+ALT+T** (default hotkey).

The **last two entries** in this list also output the **Ubuntu release** your current Linux Mint version is based on.

### 1. /etc/issue

Starting out with the simplest CLI method, you can print out the contents of **/etc/issue **to check your **Version Number** and **Codename**:

```
mint@mint:~$ cat /etc/issue
Linux Mint 19.2 Tina \n \l
```


### 2. hostnamectl

![hostnamectl](https://itsfoss.com/content/images/wordpress/2019/09/hostnamectl.jpg)

This single command (**hostnamectl**) prints almost the same information as that found in **System Info**. You can see your **Operating System** (with** version number**), as well as your **kernel version**.3.

### 3. lsb_release

**lsb_release** is a very simple Linux utility to check basic information about your distribution:

```
mint@mint:~$ lsb_release -a
No LSB modules are available.
Distributor ID: LinuxMint
Description: Linux Mint 19.2 Tina
Release: 19.2
Codename: tina
```


**Note:** *I used the –*


*a*

*tag to print all parameters, but you can also use***-s**for short form,**-d**for description etc. (check**man lsb_release**for all tags).### 4. /etc/linuxmint/info

![Check Linux Mint version number with /etc/linuxmint/info](https://itsfoss.com/content/images/wordpress/2019/09/linuxmint_info.jpg)

This isn’t a command, but rather a file on any Linux Mint install. Simply use cat command to print it’s contents to your terminal and see your **Release Number** and **Codename**.

### 5. Use /etc/os-release to get Ubuntu codename as well

![Check Linux Mint version number with /etc/os-release](https://itsfoss.com/content/images/wordpress/2019/09/os_release.jpg)

Linux Mint is based on Ubuntu. Each Linux Mint release is based on a different Ubuntu release. Knowing which Ubuntu version your Linux Mint release is based on is helpful in cases where you’ll have to use Ubuntu codename while adding a repository like when you need to [install the latest Virtual Box in Linux Mint](https://itsfoss.com/install-virtualbox-ubuntu/).

**os-release **is yet another file similar to **info**, showing you the codename for the **Ubuntu** release your Linux Mint is based on.

### 6. Use /etc/upstream-release/lsb-release to get only Ubuntu base info

If you only** **want to see information about the **Ubuntu** base, output **/etc/upstream-release/lsb-release**:

```
mint@mint:~$ cat /etc/upstream-release/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04 LTS"
```


Bonus Tip: [You can just check Linux kernel version](https://itsfoss.com/find-which-kernel-version-is-running-in-ubuntu/) with the **uname** command:

```
mint@mint:~$ uname -r
4.15.0-54-generic
```


**Note:** **-r** stands for **release**, however you can check the other flags with **man uname**.

## Check Linux Mint version information using GUI

If you are not comfortable with the terminal and commands, you can use the graphical method. As you would expect, this one is pretty straight-forward.

Open up the **Menu** (bottom-left corner) and then go to **Preferences > System Info**:

![Linux Mint Menu](https://itsfoss.com/content/images/wordpress/2019/09/linux_mint_menu.jpg)

Alternatively, in the Menu you can search for **System Info**:

![Menu Search System Info](https://itsfoss.com/content/images/wordpress/2019/09/menu_search_system_info.jpg)

Here you can see both your operating system (including version number), your kernel and the version number of your DE:

![Linux Mint System Info](https://itsfoss.com/content/images/wordpress/2019/09/system_info.png)

**Wrapping Up**

I have covered some different ways you can quickly check the version and name (as well as the Ubuntu base and kernel) of the Linux Mint release you are running. I hope you found this beginner tutorial helpful. Let us know in the comments which one is your favorite method!