'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?
Solution 1:[1]
You can also try /etc/redhat-release or /etc/fedora-release:
cat /etc/fedora-release
Fedora release 7 (Moonshine)
Solution 2:[2]
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 3:[3]
The simplest command which can give you what you need but some other good info too is:
hostnamectl
Solution 4:[4]
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 5:[5]
cat /etc/*release
It's universal for almost any major distribution.
Solution 6:[6]
[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 7:[7]
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 8:[8]
What about uname -a ?
Solution 9:[9]
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 10:[10]
Solution 11:[11]
uname -a works with my fc11
Solution 12:[12]
use commmand , screenfetch output format info.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow

