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 -aExample 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