본문 바로가기

리눅스

리눅스 lsb_release 명령어

728x90

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
======================================================================================
Installing:
 redhat-lsb-core                x86_64    4.1-27.el7.centos.1    base           38 k
Installing for dependencies:
 cups-client                    x86_64    1:1.6.3-51.el7         base          153 k
 redhat-lsb-submod-security     x86_64    4.1-27.el7.centos.1    base           15 k
 spax                           x86_64    1.5.2-13.el7           base          260 k

lsb_release 명령 실행

lsb_release -a
$ lsb_release -a
LSB Version:	:core-4.1-amd64:core-4.1-noarch
Distributor ID:	CentOS
Description:	CentOS Linux release 7.9.2009 (Core)
Release:	7.9.2009
Codename:	Core
lsb_release -d
$ lsb_release -d
Description:	CentOS Linux release 7.9.2009 (Core)
728x90

 

ubuntu에서 lsb-release 패키지를 설치하는 방법

apt install -y lsb-release

lsb_release 명령 실행

lsb_release -a
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.4 LTS
Release:	20.04
Codename:	focal

 

추가로 우분투에서 LSB Version 출력하기

  • lsb 패키지 설치하기
apt-get install -y lsb

 

lsb_release
$ lsb_release
LSB Version:	core-11.1.0ubuntu4-noarch:printing-11.1.0ubuntu4-noarch:security-11.1.0ubuntu4-noarch

 

lsb_release -a
$ lsb_release -a
LSB Version:	core-11.1.0ubuntu4-noarch:printing-11.1.0ubuntu4-noarch:security-11.1.0ubuntu4-noarch
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.1 LTS
Release:	22.04
Codename:	jammy

 

728x90