Determine version of Linux?
Old school UNIX programmer now needing to deal with a lot of Linux versions (RedHat, SUSE, etc) on machines without documentation. Trying to label various machines distributions and only having marginal success, Tried old reliable uname command but Linux distributions are a lot more complicated and do not believe all information is captured I need is here and need more methods to distinguish versions.
As an example using uname command: uname-s:Linux uname-r:2.6.9-89.ELsmp uname-v:#1 SMP Mon Apr 20 10:34:33 EDT 2009 uname-m:i686 uname-p:i686 uname-i:i386 No where in this does it tell me that this is a Red Hat system, something I am fairly sure it is. I think it is a version of Red Hat 5 and when I did a search I found these three systems matching kernel:
Any programmatic way of further determining version? Pretty sure dealing with 8-10 versions of Red Hat, SUSE, Oracle Linux, etc and want to further distinguish them so can write adjustments to scripts appropriately. |
If it is Red Hat, check /etc/redhat-release
Code:
# cat /etc/redhat-release |
|
Either of these commands
Code:
cat /etc/*version* |
Some distros are starting to use file /etc/os-release
Slackware v 14.0 now has the file and I think newer fedoras and red hats, some variables are suppose to match between distros. Slackware's version: Quote:
John |
Code:
cat /etc/issue |
All times are GMT -5. The time now is 10:08 AM. |