Docs / Linux Basics / How to Check Linux Distribution and Version

How to Check Linux Distribution and Version

By Admin · Feb 25, 2026 · Updated Apr 23, 2026 · 200 views · 1 min read

Different commands work on different Linux distributions. Here's how to identify what you're running.

Universal Methods

# Works on all modern distros
cat /etc/os-release

# Short version
lsb_release -a

# Kernel version
uname -r

# Full system info
uname -a

Example Output

NAME="Ubuntu"
VERSION="24.04 LTS (Noble Numbat)"
ID=ubuntu
VERSION_ID="24.04"

Distribution-Specific

# Debian/Ubuntu
cat /etc/debian_version

# RHEL-based
cat /etc/redhat-release

# AlmaLinux
cat /etc/almalinux-release

Was this article helpful?