Linux – Check Distribution & Distro Version

A few different ways to check the linux distribution and release / version

Ever find yourself in need of figuring out the exact linux distro and release number of the system you are on?  As usual in Linux – there are several ways to do this!

This is probably my favorite, because its succinct & cross-platform, but in some cases lsb_release may need to be installed.   Comes built-in to current Debian releases:

% lsb_release -d
Description:    Debian GNU/Linux 8.10 (jessie)

https://refspecs.linuxfoundation.org/LSB_3.0.0/LSB-PDA/LSB-PDA/lsbrelease.html

This is for Debian & Debian-based systems:

% cat /etc/debian_version
8.10

Here are some more methods:

% hostnamectl
   Static hostname: brackin-deb-1
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 48cbccecf9bf47c7a403f21ac21ea1d0
           Boot ID: 44eaf92350f2479aa3474b60c419dc15
    Virtualization: kvm
  Operating System: Debian GNU/Linux 8 (jessie)
            Kernel: Linux 3.16.0-4-amd64

https://www.freedesktop.org/software/systemd/man/hostnamectl.html

 

% cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

https://www.freedesktop.org/software/systemd/man/os-release.html

Sharing is caring!

Leave a Comment

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


Notice: Undefined index: total_count_position in /var/www/wordpress/wp-content/plugins/social-pug/inc/functions-frontend.php on line 46
shares