How do I know which version of Debian I'm running?

Commands to try:

cat /etc/*-release

cat /proc/version

lsb_release -a
- this shows "certain LSB (Linux Standard Base) and distribution-specific information".

For a shell script to get the details on different platforms, there's this related question.


To get the exact version number use

cat /etc/debian_version

$ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

Tags:

Debian

Version