lsb_release 명령어 썸네일형 리스트형 리눅스에서 운영체제 및 버전을 구분하는 스크립트 리눅스에서 운영체제 및 버전을 구분하는 스크립트 스크립트를 통해 운영체제 및 버전을 더 쉽게 판단할 수 있습니다. os_checkv2.sh 스크립트 작성 vim os_checkv2.sh #!/bin/bash # 운영체제 판단 및 lsb-release 설치 if command -v apt >/dev/null; then # Ubuntu echo "Installing lsb-release on Ubuntu" apt update -qq -y >/dev/null 2>&1 apt install -qq -y lsb-release >/dev/null 2>&1 distro=$(lsb_release -i | cut -f2) os_version=$(lsb_release -sr | cut -d'.' -f1) elif comm.. 더보기 리눅스 lsb_release 명령어 lsb_release 명령어 테스트 환경 $ cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core) $ getconf LONG_BIT 64 redhat에서 redhat-lsb-core(lsb_release) 패키지를 설치하는 방법 yum install -y redhat-lsb-core $ yum install -y redhat-lsb-core ====================================================================================== Package Arch Version Repository Size ===================================================.. 더보기 이전 1 다음