Determine Fedora Version

Dominik 'Rathann' Mierzejewski D.Mierzejewski at icm.edu.pl
Fri Feb 29 11:25:32 UTC 2008


On Fri, Feb 29, 2008 at 12:54:38AM +0000, Johann B. Gudmundsson wrote:
> Will Woods wrote:
>>
>> On Feb 28, 2008, at 6:40 PM, Andrew Farris wrote:
>>
>>> Leon Stringer wrote:
>>>> Hi,
>>>> Apologies if I'm being a bit dim here. I've got various Fedora systems 
>>>> and have just wasted time trying to install packages on the wrong 
>>>> version (I was tired!).
>>>> But then I thought, how does a user determine what version of Fedora 
>>>> they're using? If I do System->About Fedora I get  explanatory text but 
>>>> nothing about the version.
>>>> I know advanced users can do uname or query package versions but there 
>>>> should be an easy/obvious way. People writing the About text for Fedora 
>>>> 9, please take note. (Or just change the menu item text to "About Fedora 
>>>> 9").
>>>> TTFN,
>>>> Leon...
>>>
>>> This is a very good point.  I suggest you take the idea and file an RFE 
>>> bug against the component 'fedora-release-notes', this is that package 
>>> that supplies the 'About Fedora' system menu item 
>>> (/usr/share/applications/about-fedora.desktop).
>>>
>>> A user should not need to cat /etd/redhat-release to find out what 
>>> version of their desktop OS they have, adding just the release number 
>>> after About Fedora would be a nice touch.
>>
>> Around F7, we[1] wrote an "About this computer" app called 
>> 'system-summary'. It's available in the repos for F8 and rawhide. It 
>> gives:
>>
>> 1) Distro version,
>> 2) kernel version,
>> 3) CPU type and count,
>> 4) RAM size, and
>> 5) Smolt ID.
>>
>> Here's a screenshot: 
>> http://wwoods.fedorapeople.org/screenshots/system-summary-0.3.png
>>
>> Maybe we should try to get it included in the System menu by default?
>>
>> -w
>>
>> [1] Okay, mostly jbowes, but I helped! Kinda!
>>
> And here is the about.sh
>
> Todo needs cpu counting and grep the smolt ID and ASCII art and colorts :)
>
> #!/bin/bash
>
> F=`cat /etc/fedora-release`
> M=`dmidecode | grep "Manufacturer:" | head -n1 | awk -F ":" '{print $2}'`
> T=`dmidecode | grep "Product Name" | head -n1 | awk -F ":" '{print $2}'`
> C=`dmidecode | grep "Max Speed" | head -n1 | awk -F ":" '{print $2}'`

dmidecode won't work without read access to /dev/mem.

> ME=`cat /proc/meminfo | head -n1 | awk '/[0-9]/ {print $2}'`
> S=`parted -l | grep Disk | awk -F ":" '{print $2}'`

parted requires whole disk device read access for this.

-1 if it requires root priviledges.

Regards,
R.

-- 
Dominik 'Rathann' Mierzejewski <rathann*at*icm.edu.pl>  |  LAN  Staff
Interdisciplinary Centre for Mathematical and Computational Modelling
Warsaw University  |  http://www.icm.edu.pl  |  tel. +48 (22) 5540810




More information about the fedora-test-list mailing list