본문 바로가기

리눅스

lsb_release 명령어

반응형

lsb_release 명령어

lsb_release 명령어는 Linux Standard Base(LSB)의 일부로 현재 시스템의 LSB 정보를 확인하는 데 사용됩니다.

테스트 환경

$ cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
$ getconf LONG_BIT
64

명령어 기본 구문

lsb_release [OPTION]
  • 옵션
    • -a 또는 --all : 시스템의 모든 LSB 정보를 자세히 출력합니다.
    • -d 또는 --description : 시스템의 설명을 출력합니다.
    • -i 또는 --id : 시스템의 배포판 ID를 출력합니다.
    • -r 또는 --release : 시스템의 배포판 릴리스 번호를 출력합니다.
    • -c 또는 --codename : 시스템의 코드명을 출력합니다.

lsb_release(redhat-lsb-core) 패키지 설치

CentOS 계열

yum install -y redhat-lsb-core

Debian 계열

apt install -y lsb-release
728x90

사용 예시

모든 LSB 정보 확인

  • 시스템의 모든 LSB 정보를 자세히 출력
lsb_release -a
$ lsb_release -a
LSB Version:	:core-4.1-aarch64:core-4.1-noarch
Distributor ID:	CentOS
Description:	CentOS Linux release 7.9.2009 (AltArch)
Release:	7.9.2009
Codename:	AltArch
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.3 LTS
Release:	22.04
Codename:	jammy

배포판 설명 확인

  • 시스템의 배포판 설명을 출력
lsb_release -d
$ lsb_release -d
Description:	CentOS Linux release 7.9.2009 (AltArch)

배포판 ID 확인

  • 시스템의 배포판 ID를 출력
lsb_release -i
$ lsb_release -i
Distributor ID:	CentOS

릴리스 번호 확인

  • 시스템의 배포판 릴리스 번호를 출력
lsb_release -r
$ lsb_release -r
Release:	7.9.2009

코드명 확인

  • 시스템의 코드명을 출력
lsb_release -c
$ lsb_release -c
Codename:	AltArch

 

728x90
반응형