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:

cat /etc/issue

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

Solution 2:

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

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

Solution 3:

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:

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

hostnamectl

Solution 5:

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.