Reputation: 2470
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
Reputation: 111
You can simply run this command to get the version number:
rpm -E %fedora
output:
Upvotes: 6
Reputation: 14233
cat /etc/issue
Or cat /etc/fedora-release
as suggested by @Bruce ONeel
Upvotes: 191
Reputation: 151
cat /etc/*release
It's universal for almost any major distribution.
Upvotes: 15
Reputation: 1634
These commands worked for Artik 10 :
and these others didn't :
Upvotes: 7
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,
Upvotes: 3
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
Reputation: 401
The simplest command which can give you what you need but some other good info too is:
hostnamectl
Upvotes: 26
Reputation: 2149
You can also try /etc/redhat-release
or /etc/fedora-release
:
cat /etc/fedora-release
Fedora release 7 (Moonshine)
Upvotes: 165
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
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