Posted By

cczona on 04/03/08


Tagged

linux


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

trey


Which version of Linux is this?


 / Published in: Bash
 

URL: http://man-wiki.net/index.php/1:lsb_release

(EDITED: Originally I had this snip using 'cat /proc/version'. But have since replaced it with a more reliable -- and specific -- method)

If you need still more info (or are on a BSD), see 'uname', 'dpkg-architecture'

  1. # version
  2. lsb-release -v
  3.  
  4. # distro
  5. lsb-release -i
  6.  
  7. # nick
  8. lsb-release -c
  9.  
  10. # those and more
  11. lsb-release -a

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: trey on April 5, 2008

Another good one ( for Ubuntu anyway):

cat /etc/lsb-release

Posted By: cczona on April 5, 2008

Thanks, trey. That led me to the revised version, above. Using the executable is considered more reliable than reading a file like /proc/version or /etc/lsb-release, because the former catches values that have been overridden.

And because lsb-release is a Linux core tool, it should be available on most distros (i.e. not just Ubuntu).

You need to login to post a comment.