How To Know Which Linux Distribution You Are Using?

Another shameless Copy/Past post…

Here are a few ways to find out which Linux distro you are using :

  • From the Boot Time messages
    Fire up your favorite terminal program and type in the following

    dmesg | head -1

    The output would be similar to:

    Linux version 4.9.0-5-amd64 (debian-kernel@lists.debian.org) (gcc version 6.3.0 20170516 (Debian 6.3.0-18) ) #1 SMP Debian 4.9.65-3+deb9u2 (2018-01-04)

  • Using /proc/version
    In the terminal type

    cat /proc/version

    The output would be like:

    Linux version 4.9.0-5-amd64 (debian-kernel@lists.debian.org) (gcc version 6.3.0 20170516 (Debian 6.3.0-18) ) #1 SMP Debian 4.9.65-3+deb9u2 (2018-01-04)

  • Using /etc/issue
    This method gives the most appropriate answer on older Linux Distributions.

    cat /etc/issue

    The output should be like:

    Debian GNU/Linux 9 \n \l

  • Using /etc/os-release
    This method works best on modern Linux distributions.

    cat /etc/os-release

    The output should be like:

    PRETTY_NAME=”Debian GNU/Linux 9 (stretch)”
    NAME=”Debian GNU/Linux”
    VERSION_ID=”9″
    VERSION=”9 (stretch)”
    ID=debian
    HOME_URL=”https://www.debian.org/”
    SUPPORT_URL=”https://www.debian.org/support”
    BUG_REPORT_URL=”https://bugs.debian.org/”

The original source is here and here.