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

LinuxFedora

Linux Problem Overview


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?

Linux Solutions


Solution 1 - Linux

cat /etc/issue

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

Solution 2 - Linux

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

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

Solution 3 - Linux

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)

Solution 4 - Linux

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

hostnamectl

Solution 5 - Linux

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.

Solution 6 - Linux

cat /etc/*release

It's universal for almost any major distribution.

Solution 7 - Linux

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

Solution 8 - Linux

These commands worked for Artik 10 :

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

and these others didn't :

  • lsb_release -a
  • uname -a

Solution 9 - Linux

What about uname -a ?

Solution 10 - Linux

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

Solution 11 - Linux

uname -a works with my fc11

Solution 12 - Linux

use commmand , screenfetch output format info.

Solution 13 - Linux

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

rpm -E %fedora

output:

enter image description here

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionpindareView Question on Stackoverflow
Solution 1 - LinuxDavid GrantView Answer on Stackoverflow
Solution 2 - LinuxBruce ONeelView Answer on Stackoverflow
Solution 3 - LinuxmyroslavView Answer on Stackoverflow
Solution 4 - LinuxGorgan RazvanView Answer on Stackoverflow
Solution 5 - Linuxstephen mulcahyView Answer on Stackoverflow
Solution 6 - LinuxxgkphdxView Answer on Stackoverflow
Solution 7 - LinuxBelmiroView Answer on Stackoverflow
Solution 8 - LinuxRafaelView Answer on Stackoverflow
Solution 9 - LinuxmouvicielView Answer on Stackoverflow
Solution 10 - LinuxOld Uncle HoView Answer on Stackoverflow
Solution 11 - LinuxAjayView Answer on Stackoverflow
Solution 12 - LinuxprowndView Answer on Stackoverflow
Solution 13 - LinuxiliaView Answer on Stackoverflow