black electronics

Linux System Information

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.

Terminal window
cat /etc/os-release # Distribution name and version
cat /etc/*release # Broader release info, useful if /etc/os-release is missing
hostnamectl # Hostname plus OS, kernel and architecture summary
lsb_release -a # Distribution version (where lsb_release is installed)
uname -a # Full kernel version and architecture
uname -r # Kernel version only
Useful LinksPentest PayloadsCheat Sheets