Common commands for identifying the OS, distribution and kernel version on Linux.
The first thing worth checking on any Linux host, whether it’s your own VM or one you’ve just landed a shell on, is exactly what distribution and kernel you’re dealing with.
cat /etc/os-release # Distribution name and versioncat /etc/*release # Broader release info, useful if /etc/os-release is missinghostnamectl # Hostname plus OS, kernel and architecture summarylsb_release -a # Distribution version (where lsb_release is installed)uname -a # Full kernel version and architectureuname -r # Kernel version only



