Skip to main content
version-os

การตรวจสอบเวอร์ชั่นของ Ubuntu

root@admin1:~# cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.1 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
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=jammy

เวอร์ชั่นต่ำกว่า 16.04 สามารถใช้คำสั่ง
root@admin1:~# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS"

----------------------
root@admin1:~# hostnamectl
 Static hostname: admin1
       Icon name: computer-vm
         Chassis: vm
      Machine ID: 20e13aa9b2784ceeb651a729779782ba
         Boot ID: 9b88cc92beeb4e9c9e148e5b07f0b86f
  Virtualization: oracle
Operating System: Ubuntu 22.04.1 LTS
          Kernel: Linux 5.15.0-52-generic
    Architecture: x86-64
 Hardware Vendor: innotek Gmb

-------------------------

root@admin1:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.1 LTS
Release:        22.04
Codename:       jammy

------------------

 

Tags