/ 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'
Expand |
Embed | Plain Text
# version lsb-release -v # distro lsb-release -i # nick lsb-release -c # those and more lsb-release -a
Comments
Subscribe to comments
You need to login to post a comment.

Another good one ( for Ubuntu anyway):
cat /etc/lsb-release
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).