Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
I am a beginner linux user and have a linux box. It did not have yum or apt or anything useful installed, so I am trying to install one or ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2008
    Posts
    2

    How Can I find What Distro Is Running?


    I am a beginner linux user and have a linux box. It did not have yum or apt or anything useful installed, so I am trying to install one or the other to make life easier with dependencies.

    However, I'm not sure which distribution is running on the machine and am not sure the easiest way to look it up.

    uname just says 'Linux'
    uname -r is '2.6.9-023stab044.4-enterprise'

    Anyways, I just am not sure how to figure it out.

  2. #2
    Linux Engineer khafa's Avatar
    Join Date
    Apr 2008
    Location
    Tokyo, Japan
    Posts
    858
    hi,

    you can check it as follows
    Code:
    cat /proc/version
    Linux and me it's a love story

  3. #3
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,763
    Look for a file with "release" or "version" in the name under /etc - hopefully there is one.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer khafa's Avatar
    Join Date
    Apr 2008
    Location
    Tokyo, Japan
    Posts
    858
    Quote Originally Posted by HROAdmin26 View Post
    Look for a file with "release" or "version" in the name under /etc - hopefully there is one.
    /proc/version does not depend on distros i think.
    Linux and me it's a love story

  6. #5
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    I agree with HROAdmin26. Execute this
    Code:
    cat /etc/*release*
    cat /etc/*version*
    Last edited by devils casper; 06-18-2008 at 06:11 PM.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  7. #6
    Linux Engineer khafa's Avatar
    Join Date
    Apr 2008
    Location
    Tokyo, Japan
    Posts
    858
    Quote Originally Posted by devils casper View Post
    I agree with HROAdmin26. Execute this
    Code:
    cat /etc/*release*
    can you explain.
    because using /proc/version works on my Debian system while there is no file of the name /etc/*release* on the same system.
    Linux and me it's a love story

  8. #7
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Oops ! My mistake. I forgot to add command for version. I have edited my last post.
    Debian is the only distro which doesn't have release file. It has /etc/debian-version file.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  9. #8
    Linux Engineer khafa's Avatar
    Join Date
    Apr 2008
    Location
    Tokyo, Japan
    Posts
    858
    Quote Originally Posted by devils casper View Post
    Oops ! My mistake. I forgot to add command for version. I have edited my last post.
    Debian is the only distro which doesn't have release file. It has /etc/debian-version file.
    and is there any distro that does not provide /proc/version?
    because i dont see why you guys avoid this one
    Linux and me it's a love story

  10. #9
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Quote Originally Posted by khafa View Post
    and is there any distro that does not provide /proc/version?
    because i dont see why you guys avoid this one
    /proc/version tell you about the version of GCC which used for the kernel compilation. It doesn't necessarily tell which distro/version the host is running.

    Code:
    casper@devils-den : $ cat /proc/version
    Linux version 2.6.20-16-generic (root@terranova)
    (gcc version 4.1.2 (Ubuntu 4.1.2-0ubuntu4)) #2 SMP Tue Feb 12 05:41:34 UTC 2008
    This doesn't mean that I am running Ubuntu 4.1.2.

    If you mount / partition in LiveCD, there wont be any /proc/version. Its available after system boot up only.
    Last edited by devils casper; 06-18-2008 at 07:05 PM. Reason: typo
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  11. #10
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,763
    The more info, the better. Use 'em both to make a best guess, but as Casper mentioned, strictly using /proc/version won't give you the whole picture.

    For example, /proc/version on a machine may show "SUSE Linux," but that doesn't tell me specifics. That *plus* /etc/SuSE-release shows me openSuSE 10.3.

    Code:
    cat /proc/version
    Linux version 2.6.22.5-31-bigsmp (geeko@buildhost) (gcc version 4.2.1 (SUSE Linux)) #1 SMP 2007/09/21 22:29:00 UTC
    Code:
    cat /etc/SuSE-release
    openSUSE 10.3 (i586)
    VERSION = 10.3

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •