Determining Linux Release

James Bourne jbourne at hardrock.org
Tue Feb 3 19:07:33 UTC 2009


On Tue, 3 Feb 2009, Hearn, Stan J. wrote:

> 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?

This file exists in all the flavours of redhat that I know of including
centos and FC.

Regards
James

>
> Thanks,
> Stan
>
> --
> redhat-sysadmin-list mailing list
> redhat-sysadmin-list at redhat.com
> https://www.redhat.com/mailman/listinfo/redhat-sysadmin-list
>
>

-- 
James Bourne                  | Email:            jbourne at hardrock.org
UNIX Systems Administration   | WWW:           http://www.hardrock.org
Custom UNIX Programming       | Linux:  The choice of a GNU generation
----------------------------------------------------------------------
"All you need's  an occasional kick in  the philosophy." Frank Herbert
Need an inexpensive domain alternative?  http://fastforwarddomains.com




More information about the redhat-sysadmin-list mailing list