Linux: Show distribution and version of OS

Sometimes you just want to know the name and version of the linux distribution you are currently working on (very useful when working on many different systems or if you are logged in a customers system).
Well, to find out just try one of these one liners:

cat /etc/*-release

prints something like this:

PRETTY_NAME="Debian GNU/Linux 7 (wheezy)"
NAME="Debian GNU/Linux"
VERSION_ID="7"
VERSION="7 (wheezy)"
ID=debian
ANSI_COLOR="1;31"
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support/"
BUG_REPORT_URL="http://bugs.debian.org/"
lsb_release -a

prints something like this:

No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 7.9 (wheezy)
Release:        7.9
Codename:       wheezy
Tagged with: , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*