如何找到我使用的 Fedora 版本?

发布于 2024-07-13 09:06:57 字数 246 浏览 9 评论 0原文

sudo find /etc | xargs grep -i fedora > searchFedora

给出:

/etc/netplug.d/netplug: # At least on Fedora Core 1
...

但请参阅 /etc/netplug.d/netplug 文件中的 Fedora 版本。 严重吗?

sudo find /etc | xargs grep -i fedora > searchFedora

gives:

/etc/netplug.d/netplug: # At least on Fedora Core 1
...

But see the Fedora version in the /etc/netplug.d/netplug file. Is it serious?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(14

若有似无的小暗淡 2024-07-20 09:06:57
cat /etc/issue

或者按照 @Bruce ONeel 的建议 cat /etc/fedora-release

cat /etc/issue

Or cat /etc/fedora-release as suggested by @Bruce ONeel

篱下浅笙歌 2024-07-20 09:06:57

您还可以尝试 /etc/redhat-release/etc/fedora-release

cat /etc/fedora-release 
Fedora release 7 (Moonshine)

You can also try /etc/redhat-release or /etc/fedora-release:

cat /etc/fedora-release 
Fedora release 7 (Moonshine)
左秋 2024-07-20 09:06:57

建议的标准文件是/etc/os-release。 请参阅http://www.freedesktop.org/software/systemd/man/os-release.html

你可以执行如下操作:

$ source /etc/os-release
$ echo $ID
fedora
$ echo $VERSION_ID
17
$ echo $VERSION
17 (Beefy Miracle)

The proposed standard file is /etc/os-release. See http://www.freedesktop.org/software/systemd/man/os-release.html

You can execute something like:

$ source /etc/os-release
$ echo $ID
fedora
$ echo $VERSION_ID
17
$ echo $VERSION
17 (Beefy Miracle)
戏舞 2024-07-20 09:06:57

最简单的命令可以为您提供所需的信息,但也有一些其他好的信息是:

hostnamectl

The simplest command which can give you what you need but some other good info too is:

hostnamectl
半步萧音过轻尘 2024-07-20 09:06:57

您可以尝试

lsb_release -a

至少在 Debian 和 Ubuntu 上运行(并且由于它是 LSB,所以它至少应该在大多数其他主流发行版上运行)。 http://rpmfind.net/linux /RPM/sourceforge/l/ls/lsb/lsb_release-1.0-1.i386.html 表明它已经存在相当长一段时间了。

You could try

lsb_release -a

which works on at least Debian and Ubuntu (and since it's LSB, it should surely be on most of the other mainstream distros at least). http://rpmfind.net/linux/RPM/sourceforge/l/ls/lsb/lsb_release-1.0-1.i386.html suggests it's been around quite a while.

凉风有信 2024-07-20 09:06:57
cat /etc/*release

它几乎适用于所有主要发行版。

cat /etc/*release

It's universal for almost any major distribution.

背叛残局 2024-07-20 09:06:57

这些命令适用于 Artik 10 :

  • cat /etc/fedora-release
  • cat /etc/issue
  • hostnamectl

,而其他命令则无效:

  • lsb_release -a
  • uname -a

These commands worked for Artik 10 :

  • cat /etc/fedora-release
  • cat /etc/issue
  • hostnamectl

and these others didn't :

  • lsb_release -a
  • uname -a
你在看孤独的风景 2024-07-20 09:06:57

uname -a 怎么样?

What about uname -a ?

巷子口的你 2024-07-20 09:06:57
[Belmiro@HP-550 ~]$ uname -a

Linux HP-550 2.6.30.10-105.2.23.fc11.x86_64 #1 SMP Thu Feb 11 07:06:34 UTC 2010
x86_64 x86_64 x86_64 GNU/Linux


[Belmiro@HP-550 ~]$ lsb_release -a

LSB Version: :core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:deskt
op-3.1-amd64:desktop-3.1-noarch:desktop-3.2-amd64:desktop-3.2-noarch
Distributor ID: Fedora
Description: Fedora release 11 (Leonidas)
Release: 11
Codename: Leonidas
[Belmiro@HP-550 ~]$ 
[Belmiro@HP-550 ~]$ uname -a

Linux HP-550 2.6.30.10-105.2.23.fc11.x86_64 #1 SMP Thu Feb 11 07:06:34 UTC 2010
x86_64 x86_64 x86_64 GNU/Linux


[Belmiro@HP-550 ~]$ lsb_release -a

LSB Version: :core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:deskt
op-3.1-amd64:desktop-3.1-noarch:desktop-3.2-amd64:desktop-3.2-noarch
Distributor ID: Fedora
Description: Fedora release 11 (Leonidas)
Release: 11
Codename: Leonidas
[Belmiro@HP-550 ~]$ 
演出会有结束 2024-07-20 09:06:57

您只需运行此命令即可获取版本号:

rpm -E %fedora

输出:

在此处输入图像描述

You can simply run this command to get the version number:

rpm -E %fedora

output:

enter image description here

貪欢 2024-07-20 09:06:57

在我安装 Fedora 25(工作站)时,在此文件中找到了所有发行版 ID 信息:

/usr/lib/os.release.d/os-release-workstation 

其中包括

  • NAME=Fedora
  • VERSION="25(工作站版)"
  • ID=fedora
  • VERSION_ID=25
  • PRETTY_NAME="Fedora 25(工作站版) )"
  • <...>
  • VARIANT="工作站版"
  • VARIANT_ID=工作站

On my installation of Fedora 25 (workstation) all of the distribution ID info was found in this file:

/usr/lib/os.release.d/os-release-workstation 

This included,

  • NAME=Fedora
  • VERSION="25 (Workstation Edition)"
  • ID=fedora
  • VERSION_ID=25
  • PRETTY_NAME="Fedora 25 (Workstation Edition)"
  • <...>
  • VARIANT="Workstation Edition"
  • VARIANT_ID=workstation
美胚控场 2024-07-20 09:06:57

uname -a 适用于我的 fc11

uname -a works with my fc11

戏剧牡丹亭 2024-07-20 09:06:57

cat /etc/os-release

适用于 Fedora 和 Silverblue。

cat /etc/os-release

Works both on Fedora and Silverblue.

我的痛♀有谁懂 2024-07-20 09:06:57

使用命令,屏幕抓取
输出格式信息。

use commmand , screenfetch
output format info.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文