Determining Linux Release

Bashi, Enils Enils.Bashi at FTIConsulting.com
Tue Feb 3 19:05:36 UTC 2009


Try lsb_release. Example:

$ lsb_release  -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 6.06.2 LTS
Release:        6.06
Codename:       dapper
--

Regards,

Enils 

-----Original Message-----
From: redhat-sysadmin-list-bounces at redhat.com
[mailto:redhat-sysadmin-list-bounces at redhat.com] On Behalf Of Hearn, Stan J.
Sent: Tuesday, February 03, 2009 2:00 PM
To: redhat-sysadmin-list at redhat.com
Subject: Determining Linux Release

I need to determine the version of Linux in a script.

I would prefer to use the uname command.  I use that currently for Solaris.
But that really only gives me the kernel version in Linux.  Right?

With Redhat I could use the /etc/redhat-release, but would that work for
other flavors like Fedora, CentOS, etc...?  Is there a standard for Linux
based distros to use /etc/*-release to identify itself?

Thanks,
Stan

--
redhat-sysadmin-list mailing list
redhat-sysadmin-list at redhat.com
https://www.redhat.com/mailman/listinfo/redhat-sysadmin-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 7451 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/redhat-sysadmin-list/attachments/20090203/5f520b43/attachment.bin>


More information about the redhat-sysadmin-list mailing list