"리눅스 종류 확인, 리눅스 버전 확인"의 두 판 사이의 차이

 
(사용자 3명의 중간 판 4개는 보이지 않습니다)
11번째 줄: 11번째 줄:
===방법 1: /etc/*-release===
===방법 1: /etc/*-release===
;명령어
;명령어
<source lang='bash'>
<syntaxhighlight lang='bash'>
grep . /etc/*-release
grep . /etc/*-release
</source>
</syntaxhighlight>
<source lang='bash'>
<syntaxhighlight lang='bash'>
cat /etc/*-release | uniq
cat /etc/*-release | uniq
</source>
</syntaxhighlight>


;실행예시 (Ubuntu 14.04.3)
;실행예시 (Ubuntu 14.04.3)
<source lang='console'>
<syntaxhighlight lang='console'>
root@zetawiki:~# grep . /etc/*-release
root@zetawiki:~# grep . /etc/*-release
/etc/lsb-release:DISTRIB_ID=Ubuntu
/etc/lsb-release:DISTRIB_ID=Ubuntu
34번째 줄: 34번째 줄:
/etc/os-release:SUPPORT_URL="http://help.ubuntu.com/"
/etc/os-release:SUPPORT_URL="http://help.ubuntu.com/"
/etc/os-release:BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
/etc/os-release:BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
</source>
</syntaxhighlight>


;실행예시 (CentOS 6.5)
;실행예시 (CentOS 6.5)
<source lang='console'>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# grep . /etc/*-release
[root@zetawiki ~]# grep . /etc/*-release
/etc/centos-release:CentOS release 6.5 (Final)
/etc/centos-release:CentOS release 6.5 (Final)
43번째 줄: 43번째 줄:
/etc/redhat-release:CentOS release 6.5 (Final)
/etc/redhat-release:CentOS release 6.5 (Final)
/etc/system-release:CentOS release 6.5 (Final)
/etc/system-release:CentOS release 6.5 (Final)
</source>
</syntaxhighlight>


;실행예시 (Fedora 11 Leonidas)
;실행예시 (Fedora 11 Leonidas)
<source lang='console'>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# cat /etc/*-release | uniq
[root@zetawiki ~]# cat /etc/*-release | uniq
Fedora release 11 (Leonidas)
Fedora release 11 (Leonidas)
</source>
</syntaxhighlight>


;실행예시 (Oracle Enterprise Linux Server 5.5)
;실행예시 (Oracle Enterprise Linux Server 5.5)
<source lang='console'>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# cat /etc/*-release | uniq
[root@zetawiki ~]# cat /etc/*-release | uniq
Enterprise Linux Enterprise Linux Server release 5.5 (Carthage)
Enterprise Linux Enterprise Linux Server release 5.5 (Carthage)
Red Hat Enterprise Linux Server release 5.5 (Tikanga)
Red Hat Enterprise Linux Server release 5.5 (Tikanga)
</source>
</syntaxhighlight>


;실행예시 (SUSE Linux Enterprise Server 11)
;실행예시 (SUSE Linux Enterprise Server 11)
<source lang='console'>
<syntaxhighlight lang='console'>
zetawiki:~ # cat /etc/*-release | uniq
zetawiki:~ # cat /etc/*-release | uniq
SUSE Linux Enterprise Server 11 (x86_64)
SUSE Linux Enterprise Server 11 (x86_64)
65번째 줄: 65번째 줄:
PATCHLEVEL = 1
PATCHLEVEL = 1
LSB_VERSION="core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64"
LSB_VERSION="core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64"
</source>
</syntaxhighlight>


===방법 2: /etc/issue*===
===방법 2: /etc/issue*===
;명령어
;명령어
<source lang='bash'>
<syntaxhighlight lang='bash'>
grep . /etc/issue*
grep . /etc/issue*
</source>
</syntaxhighlight>
* 배포판의 버전을 가장 쉽게 확인할 수 있는 방법이다.
* 배포판의 버전을 가장 쉽게 확인할 수 있는 방법이다.
* 보안 등의 이유로 다른 내용으로 바뀌어 있는 경우도 있다.
* 보안 등의 이유로 다른 내용으로 바뀌어 있는 경우도 있다.


;실행예시 (Ubuntu 14.04.3)
;실행예시 (Ubuntu 14.04.3)
<source lang='console'>
<syntaxhighlight lang='console'>
root@zetawiki:~# grep . /etc/issue*
root@zetawiki:~# grep . /etc/issue*
/etc/issue:Ubuntu 14.04.3 LTS \n \l
/etc/issue:Ubuntu 14.04.3 LTS \n \l
/etc/issue.net:Ubuntu 14.04.3 LTS
/etc/issue.net:Ubuntu 14.04.3 LTS
</source>
</syntaxhighlight>


;실행예시 (CentOS 6.5)
;실행예시 (CentOS 6.5)
<source lang='console'>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# grep . /etc/issue*
[root@zetawiki ~]# grep . /etc/issue*
/etc/issue:CentOS release 6.5 (Final)
/etc/issue:CentOS release 6.5 (Final)
89번째 줄: 89번째 줄:
/etc/issue.net:CentOS release 6.5 (Final)
/etc/issue.net:CentOS release 6.5 (Final)
/etc/issue.net:Kernel \r on an \m
/etc/issue.net:Kernel \r on an \m
</source>
</syntaxhighlight>


;실행예시 (Fedora 11)
;실행예시 (Fedora 11)
<source lang='console'>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# cat /etc/issue
[root@zetawiki ~]# cat /etc/issue
Fedora release 11 (Leonidas)
Fedora release 11 (Leonidas)
Kernel \r on an \m (\l)
Kernel \r on an \m (\l)
</source>
</syntaxhighlight>


;실행예시 (Oracle Enterprise Linux 5.5)
;실행예시 (Oracle Enterprise Linux 5.5)
<source lang='console'>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# cat /etc/issue
[root@zetawiki ~]# cat /etc/issue
Enterprise Linux Enterprise Linux Server release 5.5 (Carthage)
Enterprise Linux Enterprise Linux Server release 5.5 (Carthage)
Kernel \r on an \m
Kernel \r on an \m
</source>
</syntaxhighlight>


;실행예시 (SUSE Linux Enterprise Server 11)
;실행예시 (SUSE Linux Enterprise Server 11)
<source lang='console'>
<syntaxhighlight lang='console'>
zetawiki:~ # cat /etc/issue
zetawiki:~ # cat /etc/issue


Welcome to SUSE Linux Enterprise Server 11 SP1  (x86_64) - Kernel \r (\l).
Welcome to SUSE Linux Enterprise Server 11 SP1  (x86_64) - Kernel \r (\l).
</source>
</syntaxhighlight>


===방법 3: rpm (레드햇계열)===
===방법 3: rpm (레드햇계열)===
<source lang='bash'>
<syntaxhighlight lang='bash'>
rpm -qa *-release
rpm -qa *-release
</source>
</syntaxhighlight>


;실행예시 (CentOS 6.2)
;실행예시 (CentOS 6.2)
<source lang='console'>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# rpm -qa *-release
[root@zetawiki ~]# rpm -qa *-release
centos-release-6-2.el6.centos.7.x86_64
centos-release-6-2.el6.centos.7.x86_64
</source>
</syntaxhighlight>


;실행예시 (Fedora 11 Leonidas)
;실행예시 (Fedora 11 Leonidas)
<source lang='console'>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# rpm -qa *-release
[root@zetawiki ~]# rpm -qa *-release
fedora-release-11-1.noarch
fedora-release-11-1.noarch
</source>
</syntaxhighlight>


;실행예시 (Oracle Enterprise Linux Server 5.5)
;실행예시 (Oracle Enterprise Linux Server 5.5)
<source lang='console'>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# rpm -qa *-release
[root@zetawiki ~]# rpm -qa *-release
enterprise-release-5-0.0.22
enterprise-release-5-0.0.22
</source>
</syntaxhighlight>


;실행예시 (SUSE Linux Enterprise Server 11)
;실행예시 (SUSE Linux Enterprise Server 11)
<source lang='console'>
<syntaxhighlight lang='console'>
zetawiki:~ # rpm -qa *-release
zetawiki:~ # rpm -qa *-release
sles-release-11.1-1.152
sles-release-11.1-1.152
lsb-release-2.0-1.2.18
lsb-release-2.0-1.2.18
</source>
</syntaxhighlight>


==같이 보기==
==같이 보기==
* [[/etc/os-release]] ★
{{z컬럼3|
* [[리눅스 커널 버전 확인]] ★
* [[커널]]
* [[커널]]
* [[리눅스]]
* [[리눅스]]
150번째 줄: 149번째 줄:
* [[리눅스 배포판]]
* [[리눅스 배포판]]
* [[/proc/version]]
* [[/proc/version]]
* [[JDK 버전 확인]]
* [[/etc/os-release]]
* [[아파치 버전 확인]]
* [[윈도우 종류 확인]]
* [[윈도우 종류 확인]]
* [[리눅스 BIT 확인하기]]
* [[리눅스 BIT 확인하기]]
* [[리눅스 커널 버전 확인]] ★
* [[SuSE 리눅스인지 아닌지 확인]]
* [[SuSE 리눅스인지 아닌지 확인]]
}}


==주석==
==참고==
<references/>
* https://www.lainyzine.com/ko/article/how-to-check-your-linux-distribution-and-version/ 리눅스 배포판 및 버전 확인하는 방법


[[분류:리눅스]]
[[분류:리눅스]]
[[분류:버전 확인]]
[[분류:버전 확인]]

2021년 12월 26일 (일) 14:06 기준 최신판

리눅스 종류 확인하기
리눅스 버전 확인하기
리눅스 배포판 확인하기

1 개요[ | ]

2 배포판 버전 확인[ | ]

2.1 방법 1: /etc/*-release[ | ]

명령어
grep . /etc/*-release
cat /etc/*-release | uniq
실행예시 (Ubuntu 14.04.3)
root@zetawiki:~# grep . /etc/*-release
/etc/lsb-release:DISTRIB_ID=Ubuntu
/etc/lsb-release:DISTRIB_RELEASE=14.04
/etc/lsb-release:DISTRIB_CODENAME=trusty
/etc/lsb-release:DISTRIB_DESCRIPTION="Ubuntu 14.04.3 LTS"
/etc/os-release:NAME="Ubuntu"
/etc/os-release:VERSION="14.04.3 LTS, Trusty Tahr"
/etc/os-release:ID=ubuntu
/etc/os-release:ID_LIKE=debian
/etc/os-release:PRETTY_NAME="Ubuntu 14.04.3 LTS"
/etc/os-release:VERSION_ID="14.04"
/etc/os-release:HOME_URL="http://www.ubuntu.com/"
/etc/os-release:SUPPORT_URL="http://help.ubuntu.com/"
/etc/os-release:BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
실행예시 (CentOS 6.5)
[root@zetawiki ~]# grep . /etc/*-release
/etc/centos-release:CentOS release 6.5 (Final)
/etc/lsb-release:LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
/etc/redhat-release:CentOS release 6.5 (Final)
/etc/system-release:CentOS release 6.5 (Final)
실행예시 (Fedora 11 Leonidas)
[root@zetawiki ~]# cat /etc/*-release | uniq
Fedora release 11 (Leonidas)
실행예시 (Oracle Enterprise Linux Server 5.5)
[root@zetawiki ~]# cat /etc/*-release | uniq
Enterprise Linux Enterprise Linux Server release 5.5 (Carthage)
Red Hat Enterprise Linux Server release 5.5 (Tikanga)
실행예시 (SUSE Linux Enterprise Server 11)
zetawiki:~ # cat /etc/*-release | uniq
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 1
LSB_VERSION="core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64"

2.2 방법 2: /etc/issue*[ | ]

명령어
grep . /etc/issue*
  • 배포판의 버전을 가장 쉽게 확인할 수 있는 방법이다.
  • 보안 등의 이유로 다른 내용으로 바뀌어 있는 경우도 있다.
실행예시 (Ubuntu 14.04.3)
root@zetawiki:~# grep . /etc/issue*
/etc/issue:Ubuntu 14.04.3 LTS \n \l
/etc/issue.net:Ubuntu 14.04.3 LTS
실행예시 (CentOS 6.5)
[root@zetawiki ~]# grep . /etc/issue*
/etc/issue:CentOS release 6.5 (Final)
/etc/issue:Kernel \r on an \m
/etc/issue.net:CentOS release 6.5 (Final)
/etc/issue.net:Kernel \r on an \m
실행예시 (Fedora 11)
[root@zetawiki ~]# cat /etc/issue
Fedora release 11 (Leonidas)
Kernel \r on an \m (\l)
실행예시 (Oracle Enterprise Linux 5.5)
[root@zetawiki ~]# cat /etc/issue
Enterprise Linux Enterprise Linux Server release 5.5 (Carthage)
Kernel \r on an \m
실행예시 (SUSE Linux Enterprise Server 11)
zetawiki:~ # cat /etc/issue

Welcome to SUSE Linux Enterprise Server 11 SP1  (x86_64) - Kernel \r (\l).

2.3 방법 3: rpm (레드햇계열)[ | ]

rpm -qa *-release
실행예시 (CentOS 6.2)
[root@zetawiki ~]# rpm -qa *-release
centos-release-6-2.el6.centos.7.x86_64
실행예시 (Fedora 11 Leonidas)
[root@zetawiki ~]# rpm -qa *-release
fedora-release-11-1.noarch
실행예시 (Oracle Enterprise Linux Server 5.5)
[root@zetawiki ~]# rpm -qa *-release
enterprise-release-5-0.0.22
실행예시 (SUSE Linux Enterprise Server 11)
zetawiki:~ # rpm -qa *-release
sles-release-11.1-1.152
lsb-release-2.0-1.2.18

3 같이 보기[ | ]

4 참고[ | ]

  1. 리눅스 서버관리 실무 바이블 3.0 p.89
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}