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?
cat /etc/issue
Or cat /etc/fedora-release
as suggested by @Bruce ONeel
You can also try /etc/redhat-release
or /etc/fedora-release
:
cat /etc/fedora-release
Fedora release 7 (Moonshine)
cat /etc/redhat-release
works for me too, but the better is cat /etc/os-release
which really gives detailled information.
Sep 4, 2015 at 12:02
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)
source
to load the variables, I always tried to parse the values. Brilliant!
The simplest command which can give you what you need but some other good info too is:
hostnamectl
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.
redhat-lsb
, which wasn't installed by default on my box at work, at least (Fedora 15) (corporate IT fail?) but was on my home Fedora 16 box. (Not sure if it's a default package or not)
cat /etc/*release
It's universal for almost any major distribution.
These commands worked for Artik 10 :
and these others didn't :
What about uname -a
?
[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 ~]$
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,
use commmand , screenfetch output format info.
cat /etc/fedora-release/