#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2004
    Posts
    245
    Rep Power
    10

    How to check Linux version No.?


    Code:
    I am using a Redhat Linux machine. I want to know the version number of 
    
    the operating system. How can I check?  I don't install this Redhat.
    
    Thanks,

    Comments on this post

    • kicken disagrees : Yet again, don't abuse the code tags!
  2. #2
  3. Wiser? Not exactly.
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    May 2001
    Location
    Bonita Springs, FL
    Posts
    5,944
    Rep Power
    4033
    Code:
    uname -a
    That will tell you which kernel version is running. As far as redhat version number, there might be a file somewhere, or you can guess based on the kernel version maybe.

    Also, don't use the [code][/code] tags unless your posting actual code or a command line or console output. Leave your normal post text out of them. It only makes your posts a pain to read. I've told you this before.
    Recycle your old CD's, don't just trash them



    If I helped you out, show some love with some reputation, or tip with Bitcoins to 1N645HfYf63UbcvxajLKiSKpYHAq2Zxud
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2006
    Location
    US - NJ-
    Posts
    82
    Rep Power
    11
    Hello,

    You can also find the Linux version from bellow mentioned file.
    cat /proc/version == > this file display out put like this
    Linux version 2.4.21-27.ELsmp (bhcompile@bugs.build.redhat.com) (gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-47)) #1 SMP Wed Dec 1 21:59:02 EST 2004)

    Thanks
    Innovative2000

    Comments on this post

    • LinuxPenguin agrees
  6. #4
  7. No Profile Picture
    Brony & F/OSS Advocate
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2003
    Location
    Anaheim, CA (USA)
    Posts
    6,653
    Rep Power
    2476
    If you're sure it's a Red Hat-based system, the release number and codename will be in the /etc/redhat-release file (single line, plain text). On Fedora systems, /etc/redhat-release is a relative symlink to the fedora-release file in the same directory which contains that information.
    Code:
    $ cat /etc/redhat-release
    Fedora Core release 5 (Bordeaux)
    Edit: I should add that other systems have similar files. For example, a Gentoo system would contain an /etc/gentoo-release file, and so on and so forth.

    Comments on this post

    • LinuxPenguin agrees : (0, so you stay exactly on 256 ;)) Excellent
    Last edited by codergeek42; July 4th, 2006 at 07:05 PM. Reason: Add addendum about other distrps.
    ~~ Peter ~~ :: ( Who am I? ) :: ( Peter's Musings: Uploading myself, bit by bit... ) :: ( Electronic Frontier Foundation ) :: ( I'm a GNU/Linux addict and Free Software Advocate. ) :: ( How to Ask Questions the Smart Way ) :: ( The Fedora Project, sponsored by Red Hat ) :: ( GNOME: The Free Software Desktop Project ) :: ( GnuPG Public Key ) :: ( About me on the WIki )
  8. #5
  9. No Profile Picture
    Permanently Banned
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2006
    Location
    New England
    Posts
    19
    Rep Power
    0
    google ftw

    edit:

    sry for being an e-***.

    http://linuxreviews.org/man/uname/
  10. #6
  11. No Profile Picture
    Brony & F/OSS Advocate
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2003
    Location
    Anaheim, CA (USA)
    Posts
    6,653
    Rep Power
    2476
    Originally Posted by Takkun
    google ftw

    edit:

    sry for being an e-***.

    http://linuxreviews.org/man/uname/
    Not necessarily. While many distro vendors append a tag to the kernel version, it is not a reliable way to determine the distribution in use. For example, I know a few people who are using's Arch Linux's kernel patchset on Gentoo, and people may choose to rebuild their kernel using vanilla source trees on virtually any distro.

    That aside, a mix of uname- and distro-release file-based checking is probably the most accurate way to detect the distro. There are also some commands that show vendor information, such as the GCC version or libc.so.6 headers. None of these are foolproof methods though, for similar reasons that the kernel version isn't a foolproof way to detect the distro in use.
    ~~ Peter ~~ :: ( Who am I? ) :: ( Peter's Musings: Uploading myself, bit by bit... ) :: ( Electronic Frontier Foundation ) :: ( I'm a GNU/Linux addict and Free Software Advocate. ) :: ( How to Ask Questions the Smart Way ) :: ( The Fedora Project, sponsored by Red Hat ) :: ( GNOME: The Free Software Desktop Project ) :: ( GnuPG Public Key ) :: ( About me on the WIki )
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2006
    Location
    Xiamen,China
    Posts
    3
    Rep Power
    0
    uname -r
  14. #8
  15. fork while true;
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    May 2005
    Location
    England, UK
    Posts
    5,538
    Rep Power
    1051
    Originally Posted by frankxue
    uname -r
    That is included with uname -a

    example
    bash Code:
    james@opiate ~ $ uname -a
    Linux opiate 2.6.17-gentoo-r4 #2 SMP Fri Jul 28 21:26:12 Local time zone must be set--see zic  i686 Intel(R) Pentium(R) 4 CPU 2.40GHz GenuineIntel GNU/Linux
    james@opiate ~ $ uname -r
    2.6.17-gentoo-r4
  16. #9
  17. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2011
    Posts
    1
    Rep Power
    0
    Not sure if that is useful, but at least will give you hope:

    In Ubuntu the distribution is determined by:
    Code:
    lsb_release -a

IMN logo majestic logo threadwatch logo seochat tools logo