LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How do I tell what version of Linux is running? (https://www.linuxquestions.org/questions/linux-general-1/how-do-i-tell-what-version-of-linux-is-running-176825/)

IamSancho 05-01-2004 09:03 PM

How do I tell what version of Linux is running?
 
How can I tell what version, flavor or build is running on a device.
I looked /usr/lib/dv and found no entries. Not sure where else to look for this info.

usercsr 05-01-2004 09:08 PM

u can try :
Code:

uname -a

Lleb_KCir 05-01-2004 10:49 PM

that code replies what kernal vs im running, but not much more:

Quote:

Linux localhost.localdomain 2.4.20-31.9 #1 Tue Apr 13 18:04:23 EDT 2004 i686 i686 i386 GNU/Linux
not much there to find out what distro is running. or is that? ran that as root.

slakmagik 05-01-2004 11:55 PM

How can you not know what distro you're running? :) In most distros there's something like
/etc/slackware-version
in /etc. A distro's just a packager, so there's no system stuff that could tell you that. Unless you're running Mandrake and do 'ls /bin/*drake' or whatever. :D

bulliver 05-02-2004 05:03 AM

uname -a && cat /etc/*release

equinox 05-02-2004 05:59 AM

LOL this is a funny post

m6d4 05-02-2004 07:05 AM

well i m surprised if this is just the question of just seeing what distro u r running then try telneting to that machine and before login u can have enough info u want??

J.W. 05-02-2004 07:30 PM

There is really no way to define which "version" of Linux is running on your box. The uname command is the closest thing to it, which will tell you which version of the *kernel* is running.

As for which distro, it would hard to believe that you wouldn't know what you installed on your own PC. Keep in mind that a distro is simply a kernel plus a set of packages that the distro creator decided should be included. Even in the case of a stock Redhat, Mandrake, Slack, Debian, or whatever installation, if you decided on your own to install various other packages that were not part of that initial installation, would it still be a "Redhat" or "Slack" installation? That's debatable. -- J.W.

RichSPK 06-17-2007 09:29 AM

I know this is an ancient thread, but I screwed up my mail server's configuration and couldn't remember what version of Debian it was running. Google led me here. The answer for Debian is that it stores it's version number in /etc/debian_version, so type:
Code:

less /etc/debian_version
If you don't have the file /etc/debian_version then you're probably not running Debian.

Also, I can tell you one way you can forget what distro you have installed. When I switched my laptop from Windows to Linux a year or two ago, I played around with a lot of distros before I settled on one. Then I didn't have to mess with the installation for a long time, and I found when someone asked me what distro I was running, I could no longer remember whether it was Debian or Ubuntu. I was pretty sure it was Ubuntu, but another WLUG member clued me in that it must be Debian because I was running IceWeasel.

iman_idiotte 07-11-2007 02:43 PM

Thanks Bulliver
 
Quote:

Originally Posted by bulliver
uname -a && cat /etc/*release

Thanks Bulliver. I inherited a machine and needed to know the distro version. This helped.

cysn06 09-19-2007 11:42 PM

Well its a reasonable question, no matter how weird it sounds.
I am renting a web server and needed to know what it was.
Debian 4.0
Thanks

maanga 12-17-2007 11:36 AM

finally..a sensible answer...
 
http://arun.wordpress.com/2006/06/10...#comment-15123

just use cat /etc/issue

linux keeps our brain active :)

ricdave 12-18-2007 12:46 AM

I used cat /etc/issue and got the following. I assume that will work with most mainstream Linux distros.

PCLinuxOS release 2007 (PCLinuxOS) for i586
Kernel 2.6.18.8.tex5 on an i686 / \l

UpstreamSwimmer 01-17-2008 03:47 PM

Not a goofy question at all. I just got an Eee PC and knew it's runs Xandros but didn't know which version of Debian it's based on. This would be useful when searching for repos.

For the record, I looked in /etc/issue, as maanga mentioned, and found it's Debian 4.0 (etch).

As mentioned in maanga's link, /proc/version returned even more specific info: Debian 4.1.1-21.

Thanks!

bsriveria 01-26-2008 12:12 PM

SuSE answer
 
on suse run :

cd /etc

cat SuSE-release

this will give you the exact release number. :twocents:

mellowiz 02-12-2008 08:15 AM

On a Debian system:
$ cat /etc/issue.net
Debian GNU/Linux 4.0
$ cat /etc/debian_version
4.0

nsartor 02-26-2010 11:46 PM

Super Newbie figs it out
 
[QUOTE=UpstreamSwimmer;3026265]Not a goofy question at all. I just got an Eee PC and knew it's runs Xandros but didn't know which version of Debian it's based on. This would be useful when searching for repos.

For the record, I looked in /etc/issue, as maanga mentioned, and found it's Debian 4.0 (etch).

As mentioned in maanga's link, /proc/version returned even more specific info: Debian 4.1.1-21.

So I got completely lost trying to find out exactly this. I wanted to upgrade FireFox from ver 2 to 3.6 but I didn't know what distro. For the smart alecks who said look at the CD - first of all it's a DVD which is why I got this ASUS EEPC for free in the first place. It doesn't have a DVD and the guy who had it couldn't figure out how to load the OS even though it came with the disks.

Anyway I was able to load linux w/o difficulty but using the shell was new to me so just to clarify for the next newbie

First you have to get a console window open

2 ways

type "ctrl alt T"

or

open home (icon bottom left) then work/file manager/tools/open console window

you should see

/home/user>


type in

cat /proc/version


note the space beween cat and /proc

it should show something like this:

home/user> cat /proc/version
Linux version 2.6.21.4-eeepc (root@i386-coreos) (gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)) #2 Tue Jul 8 12:00:00 EDT 2008
/home/user>



Good luck newbies hope this helps any asus eee pc types.

P.S. Still haven't figured out how to update firefox

wlGibbons 08-18-2010 05:16 AM

opening old post bad i know
 
but i had to comment on the rudeness of some of the replies.
not everyone is using linux on their home pc which they installed. Not everyone who finds themselves on a linux machine is an expert who thinks re-installing their kernel once a week is fun.

There are many ways of finding yourself on a linux machine, most of these are not by choice.

cercatrova 08-28-2010 07:30 AM

another way...
 
lsb_release -a

blondezilla 08-15-2011 03:01 PM

Thank you, this helped me out greatly. For those that laughed at not knowing what version of linux is running - it's only laughable if 'you' in fact installed it. If you are shelling into a linux O/S that you need to install drivers to than this is a very useful tool.

seeker9969 10-23-2011 12:18 PM

I do not know which version of linux got installed or the commands that go with it.
 
Ya know it may seem like a dumb question but I found myself asking it this AM I downloaded gnome 3 and it was 900 mb file and installed it. I seriously do not know which version i am running now I tried to go to terminal and update with the sudo command but it does not work. I am clueless as to what commands to use So I used the command "uname -a && cat /etc/*release"
it came up with this.
Linux linux-imqh 2.6.37.6-0.7-default #1 SMP 2011-07-21 02:17:24 +0200 i686 athlon i386 GNU/Linux
openSUSE 11.4 (i586)
VERSION = 11.4
CODENAME = Celadon
Any help here would be good because none of the commands that I know are working.
help

TobiSGD 10-23-2011 12:23 PM

The output already shows that you are running the 32 bit version (i686) of openSuse 11.4, what else do you want to know?

seeker9969 10-23-2011 04:26 PM

I guess I am good now After I posted that message I didn't even know that opensuse was a version on linux. Now I do
thanks for the reply though
Al

blumax32 10-16-2012 11:42 AM

Webmin has a lot of information including what version you are running.

sgonz 05-11-2013 06:16 PM

Debian
 
/etc/os-release
PRETTY_NAME="Debian GNU/Linux 7.0 (wheezy)"
NAME="Debian GNU/Linux"
VERSION_ID="7.0"
VERSION="7.0 (wheezy)"

cat /etc/debian_version
7.0

lsb_release -a
Distributor ID: Debian
Description: Debian GNU/Linux 7.0 (wheezy)
Release: 7.0
Codename: wheezy

tjordanchat 07-31-2013 08:14 AM

How do I tell what version of Linux is running?
 
Here is a handy alias for that.

alias urel="lsb_release -a;cat /proc/version;uname -a;cat /etc/*-release"

terrypen 05-13-2014 01:04 PM

Reason for not knowing my version of Linux!!
 
Quote:

Originally Posted by bulliver (Post 910116)
uname -a && cat /etc/*release

I know that this is a really old thread, but it helped me!

Thanks bulliver!

For all the people that said.. "There is no way you can't know what version of Linux you installed!"
Here is a reason!
I am taking a Harvard course and they have an appliance to download and run in VirtualBox. I did that and now I am running a version of Linux that I did not install so I have no idea what they used. I am still a newbie in the Linux world and now need to figure out the version of linux so I can change the networking after I did the software updates that killed the networking that was working.
Generic release 19 (Generic)
NAME=Generic
VERSION="19 (Generic)"
ID=generic
VERSION_ID=19
PRETTY_NAME="Generic 19 (Generic)"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:generic:generic:19"
Generic release 19 (Generic)
Generic release 19 (Generic)

Terry

P.S. cat /proc/version actually gave more information and displayed "Red Hat 4.8.1-1"

Habitual 05-13-2014 02:03 PM

Reboot and watch the console?

ruario 05-16-2014 01:36 PM

@terrypen: pretty much any distro from the last year of so will have /etc/os-release. It is a standard release file introduced by those who brought you systemd. In this case I think it was a good idea and distros that have avoided systemd also have it, e.g. Slackware. Internal formatting is also standardised.

sundialsvcs 05-16-2014 02:59 PM

You might also find useful information in something like /proc/version or something like that.

Probably, though, a parse of the result of the uname command would be the most-generic way to do it.

samaxe 07-23-2014 01:21 PM

which flavour of linux I m running
 
I know it sounds weird but I don't know which flavour of linux i m running

i have tried:

cat /etc/issue

and it shows :

Ubuntu 14.04 LTS \n \l

I dont really get it can somebody help

szboardstretcher 07-23-2014 01:33 PM

Ubuntu

TobiSGD 07-23-2014 01:48 PM

You are running Ubuntu, in version 14.04, which is a version with long term support (LTS).
http://www.ubuntu.com/

gor0 07-23-2014 02:16 PM

Quote:

Originally Posted by samaxe (Post 5208465)
/etc/issue



Code:

Arch Linux \r (\l)
;)

suicidaleggroll 07-23-2014 05:08 PM

Quote:

Originally Posted by ruario (Post 5172234)
@terrypen: pretty much any distro from the last year of so will have /etc/os-release. It is a standard release file introduced by those who brought you systemd. In this case I think it was a good idea and distros that have avoided systemd also have it, e.g. Slackware. Internal formatting is also standardised.

RHEL/CentOS/SL 6.x doesn't have that file.

ruario 07-23-2014 11:45 PM

Quote:

Originally Posted by suicidaleggroll (Post 5208560)
RHEL/CentOS/SL 6.x doesn't have that file.

True but 7 does. This is the file users should look for first.

brianL 07-24-2014 03:28 AM

This thread has risen from the grave more times than Dracula.
Code:

bash-4.2$ cat /proc/version
Linux version 3.10.17 (root@hive64) (gcc version 4.8.2 (GCC) ) #1 SMP Fri Feb 14 16:39:21 CST 2014
bash-4.2$ cat /etc/slackware-version
Slackware 14.1
bash-4.2$ uname -a
Linux slackdesk 3.10.17 #1 SMP Fri Feb 14 16:39:21 CST 2014 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 5200+ AuthenticAMD GNU/Linux


iman_idiotte 07-25-2014 12:18 PM

"I vont to see da deeestro" said the prince of darkness. Hmm. It was funny when it was still in my head, where it should have stayed.


All times are GMT -5. The time now is 07:37 PM.