pindare
pindare

Reputation: 2470

How can I find the version of the Fedora I use?

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?

Upvotes: 155

Views: 336324

Answers (14)

c4rt0
c4rt0

Reputation: 68

cat /etc/os-release

Works both on Fedora and Silverblue.

Upvotes: 1

ilia
ilia

Reputation: 111

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

rpm -E %fedora

output:

enter image description here

Upvotes: 6

prownd
prownd

Reputation: 17

use commmand , screenfetch output format info.

Upvotes: -1

David Grant
David Grant

Reputation: 14233

cat /etc/issue

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

Upvotes: 191

xgkphdx
xgkphdx

Reputation: 151

cat /etc/*release

It's universal for almost any major distribution.

Upvotes: 15

Rafael
Rafael

Reputation: 1634

These commands worked for Artik 10 :

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

and these others didn't :

  • lsb_release -a
  • uname -a

Upvotes: 7

Old Uncle Ho
Old Uncle Ho

Reputation: 155

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

Upvotes: 3

stephen mulcahy
stephen mulcahy

Reputation: 2289

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.

Upvotes: 22

Gorgan Razvan
Gorgan Razvan

Reputation: 401

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

hostnamectl

Upvotes: 26

Bruce ONeel
Bruce ONeel

Reputation: 2149

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

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

Upvotes: 165

myroslav
myroslav

Reputation: 3793

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)

Upvotes: 61

Belmiro
Belmiro

Reputation: 69

[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 ~]$ 

Upvotes: 6

Ajay
Ajay

Reputation:

uname -a works with my fc11

Upvotes: 0

mouviciel
mouviciel

Reputation: 67849

What about uname -a ?

Upvotes: 6

Related Questions