Command to check Linux kernel version#
cat /proc/version#
@debian:~$ cat /proc/version
Linux version 5.10.0-21-amd64 ([email protected]) (gcc-10 (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2) #1 SMP Debian 5.10.162-1 (2023-01-21)
uname -a#
@debian:~$ uname -a
Linux debian 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) x86_64 GNU/Linux
Command to check Linux system version#
lsb_release -a, to display all version information:#
@debian:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
💡 This command is applicable to all Linux distributions, including RedHat, SUSE, Debian, and other distributions.
cat /etc/redhat-release, this method is only suitable for Redhat-based Linux:#
cat /etc/issue, this command is also applicable to all Linux distributions.#
@debian:~$ cat /etc/issue
Debian GNU/Linux 11 \n \l
cat /etc/os-release, this command is also applicable to all Linux distributions.#
@debian:~$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
hostnamectl, this command is also applicable to all Linux distributions.#
@debian:~$ hostnamectl
Static hostname: debian
Icon name: computer-vm
Chassis: vm
Machine ID: 9cbba9b9f67d45aba815c5aa9c2273a6
Boot ID: b4973cc962cc456392d70c8634026815
Virtualization: vmware
Operating System: Debian GNU/Linux 11 (bullseye)
Kernel: Linux 5.10.0-21-amd64
Architecture: x86-64