우분투 버전 확인 방법은 여러 방법이 있습니다. (참고 링크)

 

 

쉘 접속 시 확인

쉘에 접속하면 우분투 기본 welcome message에 버전 정보가 써있습니다.

 

 

lsb_release

lsb_release는 LSB(Linux Standard Base) 정보를 출력하는 유틸리티입니다. -a 또는 -d 옵션을 사용해 버전을 확인할 수 있습니다.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.4 LTS
Release:        18.04
Codename:       bionic

$ lsb_release -d
Description:    Ubuntu 18.04.4 LTS

 

 

/etc/issue

/etc/issue는 system identification text가 들어있는 파일인데 우분투에서 기본값으로는 OS 버전이 들어 있습니다

$ cat /etc/issue
Ubuntu 18.04.4 LTS \n \l

 

 

/etc/os-release

/etc/os-release는 OS identification data가 포함된 파일입니다. systemd가 실행중인 우분투 16.04 이상 버전만 된다고 합니다.

$cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.4 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.4 LTS"
VERSION_ID="18.04"
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"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

 

 

hostnamectl

hostnamectl은 hostname과 기타 등등의 설정을 할 수 있는 유틸리티입니다. 여기서도 OS를 확인할 수 있습니다. 우분투 16.04 이상 버전만 된다고 합니다.

$ hostnamectl
   Static hostname: ip-...
         Icon name: computer-vm
           Chassis: vm
        Machine ID: ...
           Boot ID: ...
    Virtualization: xen
  Operating System: Ubuntu 18.04.4 LTS
            Kernel: Linux 5.3.0-1032-aws
      Architecture: x86-64
반응형