https://www.geeksforgeeks.org/how-to-check-the-os-version-in-linux/#
1. cat /etc/os-release
Example1 2 3 4 5 6 7 8 9 10 11 12 13
| PRETTY_NAME="Ubuntu 24.04 LTS" NAME="Ubuntu" VERSION_ID="24.04" VERSION="24.04 LTS (Noble Numbat)" VERSION_CODENAME=noble ID=ubuntu ID_LIKE=debian HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" UBUNTU_CODENAME=noble LOGO=ubuntu-logo
|
2. lsb_release -a
Example1 2 3 4
| Distributor ID: Ubuntu Description: Ubuntu 24.04 LTS Release: 24.04 Codename: noble
|
3. hostnamectl
Example1 2 3 4 5 6 7 8 9 10
| Icon name: computer-desktop Chassis: desktop 🖥️ Operating System: Ubuntu 24.04 LTS Kernel: Linux 6.8.0-41-generic Architecture: x86-64 Hardware Vendor: Micro-Star International Co., Ltd. Hardware Model: MS-7D25 Firmware Version: 1.D0 Firmware Date: Mon 2023-07-10 Firmware Age: 1y 2month 2d
|
4. uname -r
Check the Linux Kernel version:
Example
5. dmesg | grep Linux
Example