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

 
(사용자 5명의 중간 판 20개는 보이지 않습니다)
8번째 줄: 8번째 줄:
*리눅스 배포판 목록: http://ko.wikipedia.org/wiki/리눅스_배포판
*리눅스 배포판 목록: http://ko.wikipedia.org/wiki/리눅스_배포판


==방법 1: rpm==
==배포판 버전 확인==
<source lang='bash'>
===방법 1: /etc/*-release===
rpm -qa *-release
;명령어
</source>
<syntaxhighlight lang='bash'>
grep . /etc/*-release
</syntaxhighlight>
<syntaxhighlight lang='bash'>
cat /etc/*-release | uniq
</syntaxhighlight>


;실행예시 (CentOS 6.2)
;실행예시 (Ubuntu 14.04.3)
<source lang='dos'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# rpm -qa *-release
root@zetawiki:~# grep . /etc/*-release
centos-release-6-2.el6.centos.7.x86_64
/etc/lsb-release:DISTRIB_ID=Ubuntu
</source>
/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/"
</syntaxhighlight>


;실행예시 (Fedora 11 Leonidas)
;실행예시 (CentOS 6.5)
<source lang='dos'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# rpm -qa *-release
[root@zetawiki ~]# grep . /etc/*-release
fedora-release-11-1.noarch
/etc/centos-release:CentOS release 6.5 (Final)
</source>
/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)
;실행예시 (Oracle Enterprise Linux Server 5.5)
/etc/system-release:CentOS release 6.5 (Final)
<source lang='dos'>
</syntaxhighlight>
[root@jmnote ~]# rpm -qa *-release
enterprise-release-5-0.0.22
</source>
 
;실행예시 (SUSE Linux Enterprise Server 11)
<source lang='dos'>
jmnote:~ # rpm -qa *-release
sles-release-11.1-1.152
lsb-release-2.0-1.2.18
</source>
 
==방법 2: /etc/*-release==
<source lang='bash'>
ll /etc/*-release
cat /etc/*-release | uniq
</source>
 
;실행예시 (CentOS 6.2)
<source lang='dos'>
[root@jmnote ~]# ll /etc/*-release
-rw-r--r--. 1 root root 27 Dec  9  2011 /etc/centos-release
lrwxrwxrwx. 1 root root 14 May  7  2012 /etc/redhat-release -> centos-release
lrwxrwxrwx. 1 root root 14 May  7  2012 /etc/system-release -> centos-release
</source>
<source lang='dos'>
[root@jmnote ~]# cat /etc/*-release | uniq
CentOS release 6.2 (Final)
</source>


;실행예시 (Fedora 11 Leonidas)
;실행예시 (Fedora 11 Leonidas)
<source lang='dos'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# ll /etc/*-release
[root@zetawiki ~]# cat /etc/*-release | uniq
-rw-r--r--. 1 root root 29 2009-05-12 07:45 /etc/fedora-release
lrwxrwxrwx. 1 root root 14 2009-10-29 14:53 /etc/redhat-release -> fedora-release
lrwxrwxrwx. 1 root root 14 2009-10-29 14:53 /etc/system-release -> fedora-release
</source>
<source lang='dos'>
[root@jmnote ~]# 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='dos'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# ll /etc/*-release
[root@zetawiki ~]# cat /etc/*-release | uniq
-rw-r--r-- 1 root root 64 Apr  2  2010 /etc/enterprise-release
-rw-r--r-- 1 root root 54 Apr  2  2010 /etc/redhat-release
</source>
<source lang='dos'>
[root@jmnote ~]# 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='dos'>
<syntaxhighlight lang='console'>
jmnote:~ # ll /etc/*-release
zetawiki:~ # cat /etc/*-release | uniq
-rw-r--r-- 1 root root  69 May 12  2010 /etc/SuSE-release
-rw-r--r-- 1 root root 110 May  6  2010 /etc/lsb-release
</source>
<source lang='dos'>
jmnote:~ # cat /etc/*-release | uniq
SUSE Linux Enterprise Server 11 (x86_64)
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
VERSION = 11
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>
 
;실행예시 (Ubuntu 12.04.3 LTS)
<source lang='dos'>
root@ubuntu:~# ll /etc/*-release
-rw-r--r-- 1 root root 106 Aug 17 14:46 /etc/lsb-release
-rw-r--r-- 1 root root 141 Aug 17 21:47 /etc/os-release
</source>
<source lang='dos'>
root@ubuntu:~# cat /etc/*-release | uniq
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.3 LTS"
NAME="Ubuntu"
VERSION="12.04.3 LTS, Precise Pangolin"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu precise (12.04.3 LTS)"
VERSION_ID="12.04"
</source>


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


;실행예시 (CentOS 5.7)
;실행예시 (Ubuntu 14.04.3)
<source lang='dos'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# cat /etc/issue
root@zetawiki:~# grep . /etc/issue*
CentOS release 5.7 (Final)
/etc/issue:Ubuntu 14.04.3 LTS \n \l
Kernel \r on an \m
/etc/issue.net:Ubuntu 14.04.3 LTS
</source>
</syntaxhighlight>
 
;실행예시 (CentOS 6.5)
<syntaxhighlight lang='console'>
[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
</syntaxhighlight>


;실행예시 (Fedora 11)
;실행예시 (Fedora 11)
<source lang='dos'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# 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='dos'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# 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='dos'>
<syntaxhighlight lang='console'>
jmnote:~ # 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>


;실행예시 (Ubuntu 12.04.3 LTS)
===방법 3: rpm (레드햇계열)===
<source lang='dos'>
<syntaxhighlight lang='bash'>
root@ubuntu:~# cat /etc/issue
rpm -qa *-release
Ubuntu 12.04.3 LTS \n \l
</syntaxhighlight>
</source>


==방법 4: uname (커널 버전 확인)==
;실행예시 (CentOS 6.2)
{{참고|리눅스 커널 버전 확인}}
<syntaxhighlight lang='console'>
<source lang='bash'>
[root@zetawiki ~]# rpm -qa *-release
uname -r
centos-release-6-2.el6.centos.7.x86_64
</source>
</syntaxhighlight>


;실행예시 (Fedora 11, VM)
;실행예시 (Fedora 11 Leonidas)
<source lang='dos'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# uname -r
[root@zetawiki ~]# rpm -qa *-release
2.6.30.10-105.2.23.fc11.x86_64
fedora-release-11-1.noarch
</source>
</syntaxhighlight>


;실행예시 (CentOS 5.7, Xen VM)
;실행예시 (Oracle Enterprise Linux Server 5.5)
<source lang='dos'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# uname -r
[root@zetawiki ~]# rpm -qa *-release
2.6.18-274.3.1.el5xen
enterprise-release-5-0.0.22
</source>
</syntaxhighlight>


;실행예시 (SUSE Linux Enterprise Server 11, Xen VM)
;실행예시 (SUSE Linux Enterprise Server 11)
<source lang='dos'>
<syntaxhighlight lang='console'>
jmnote:~ # uname -r
zetawiki:~ # rpm -qa *-release
2.6.32.59-0.7-xen
sles-release-11.1-1.152
</source>
lsb-release-2.0-1.2.18
 
</syntaxhighlight>
;실행예시 (Ubuntu 12.04.3 LTS)
<source lang='dos'>
root@ubuntu:~# uname -r
3.8.0-29-generic
</source>
<source lang='dos'>
root@ubuntu:~# uname -a
Linux ubuntu 3.8.0-29-generic #42~precise1-Ubuntu SMP Wed Aug 14 16:19:23 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
</source>
 
==방법 5: /proc/vesrion==
<source lang='dos'>
[root@CentOS64 ~]# cat /proc/version
Linux version 2.6.32-358.el6.x86_64 (mockbuild@c6b8.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) ) #1 SMP Fri Feb 22 00:31:26 UTC 2013
</source>


==같이 보기==
==같이 보기==
*[[리눅스 커널 버전 확인]]
{{z컬럼3|
*[[리눅스 배포판]]
* [[커널]]
*[[리눅스 BIT 확인하기]]
* [[리눅스]]
*[[/etc/issue]]
* [[/etc/issue]]
*[[/proc/version]]
* [[리눅스 배포판]]
*[[SuSE 리눅스인지 아닌지 확인]]
* [[/proc/version]]
*[[리눅스]]
* [[/etc/os-release]]
*[[커널]]
* [[윈도우 종류 확인]]
*[[JDK 버전 확인]]
* [[리눅스 BIT 확인하기]]
*[[아파치 버전 확인]]
* [[리눅스 커널 버전 확인]]
*[[윈도우 종류 확인]]
* [[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 }}