Ubuntu 22.04 バージョン確認方法
環境
Ubuntu 22.04.1 LTS
方法1
書式
cat /etc/issue
操作例
# cat /etc/issue Ubuntu 22.04.1 LTS \n \l
方法2
書式
cat /etc/lsb-release
操作例
# cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=22.04 DISTRIB_CODENAME=jammy DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS"
方法3
書式
cat /etc/os-release
操作例
# 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
方法4
書式
lsb_release -a
操作例
# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04.1 LTS Release: 22.04 Codename: jammy
方法5
書式
hostnamectl | grep “Operating System"
操作例
# hostnamectl | grep "Operating System" Operating System: Ubuntu 22.04.1 LTS