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

 
(사용자 5명의 중간 판 77개는 보이지 않습니다)
1번째 줄: 1번째 줄:
*리눅스 종류 확인하기
;리눅스 종류 확인하기
*리눅스 버전 확인하기
;리눅스 버전 확인하기
;리눅스 배포판 확인하기


==리눅스 종류 및 버전 확인==
==개요==
<source lang='bash'>
*어떤 리눅스를 사용하고 있는가?
ll /etc/*-release
*리눅스 배포판의 이름과 버전, 리눅스 커널 버전을 모두 답하는 것이 가장 정확하다.<ref>리눅스 서버관리 실무 바이블 3.0 p.89</ref>
cat /etc/redhat-release
*리눅스 배포판 목록: http://ko.wikipedia.org/wiki/리눅스_배포판
rpm -q fedora-release
</source>


===Fedora===
==배포판 버전 확인==
<source lang='dos'>
===방법 1: /etc/*-release===
[root@jmnote ~]# ll /etc/*-release
;명령어
-rw-r--r--. 1 root root 29 2009-05-12 07:45 /etc/fedora-release
<syntaxhighlight lang='bash'>
lrwxrwxrwx. 1 root root 14 2009-10-29 14:53 /etc/redhat-release -> fedora-release
grep . /etc/*-release
lrwxrwxrwx. 1 root root 14 2009-10-29 14:53 /etc/system-release -> fedora-release
</syntaxhighlight>
[root@jmnote ~]# cat /etc/redhat-release
<syntaxhighlight lang='bash'>
cat /etc/*-release | uniq
</syntaxhighlight>
 
;실행예시 (Ubuntu 14.04.3)
<syntaxhighlight lang='console'>
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/"
</syntaxhighlight>
 
;실행예시 (CentOS 6.5)
<syntaxhighlight lang='console'>
[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)
</syntaxhighlight>
 
;실행예시 (Fedora 11 Leonidas)
<syntaxhighlight lang='console'>
[root@zetawiki ~]# cat /etc/*-release | uniq
Fedora release 11 (Leonidas)
Fedora release 11 (Leonidas)
[root@jmnote ~]# cat /etc/fedora-release
</syntaxhighlight>
 
;실행예시 (Oracle Enterprise Linux Server 5.5)
<syntaxhighlight lang='console'>
[root@zetawiki ~]# cat /etc/*-release | uniq
Enterprise Linux Enterprise Linux Server release 5.5 (Carthage)
Red Hat Enterprise Linux Server release 5.5 (Tikanga)
</syntaxhighlight>
 
;실행예시 (SUSE Linux Enterprise Server 11)
<syntaxhighlight lang='console'>
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"
</syntaxhighlight>
 
===방법 2: /etc/issue*===
;명령어
<syntaxhighlight lang='bash'>
grep . /etc/issue*
</syntaxhighlight>
* 배포판의 버전을 가장 쉽게 확인할 수 있는 방법이다.
* 보안 등의 이유로 다른 내용으로 바뀌어 있는 경우도 있다.
 
;실행예시 (Ubuntu 14.04.3)
<syntaxhighlight lang='console'>
root@zetawiki:~# grep . /etc/issue*
/etc/issue:Ubuntu 14.04.3 LTS \n \l
/etc/issue.net:Ubuntu 14.04.3 LTS
</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)
<syntaxhighlight lang='console'>
[root@zetawiki ~]# cat /etc/issue
Fedora release 11 (Leonidas)
Fedora release 11 (Leonidas)
[root@jmnote ~]# rpm -q fedora-release
Kernel \r on an \m (\l)
fedora-release-11-1.noarch
</syntaxhighlight>
</source>


===OEL===
;실행예시 (Oracle Enterprise Linux 5.5)
Oracle Enterprise Linux Server
<syntaxhighlight lang='console'>
<source lang='dos'>
[root@zetawiki ~]# cat /etc/issue
[root@jmnote ~]# ll /etc/*-release
-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
[root@jmnote ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.5 (Tikanga)
[root@jmnote ~]# cat /etc/enterprise-release
Enterprise Linux Enterprise Linux Server release 5.5 (Carthage)
Enterprise Linux Enterprise Linux Server release 5.5 (Carthage)
[root@jmnote ~]# rpm -q enterprise-release
Kernel \r on an \m
enterprise-release-5-0.0.22
</syntaxhighlight>
</source>
 
;실행예시 (SUSE Linux Enterprise Server 11)
<syntaxhighlight lang='console'>
zetawiki:~ # cat /etc/issue
 
Welcome to SUSE Linux Enterprise Server 11 SP1  (x86_64) - Kernel \r (\l).
</syntaxhighlight>


===CentOS===
===방법 3: rpm (레드햇계열)===
<source lang='dos'>
<syntaxhighlight lang='bash'>
[root@jmnote ~]# ll /etc/*-release
rpm -qa *-release
-rw-r--r-- 1 root root 27 Aug 29 20:00 /etc/redhat-release
</syntaxhighlight>
[root@jmnote ~]# cat /etc/redhat-release
CentOS release 5.7 (Final)
[root@jmnote ~]# rpm -q centos-release
centos-release-5-7.el5.centos
</source>
<source lang='dos'>
[root@jmnote ~]# ls -al /etc/*-release
-rw-r--r--. 1 root root 33 Jul  2  2011 /etc/centos-release
lrwxrwxrwx. 1 root root 14 Jan  9 16:25 /etc/redhat-release -> centos-release
lrwxrwxrwx. 1 root root 14 Jan  9 16:25 /etc/system-release -> centos-release
[root@jmnote ~]# cat /etc/redhat-release
CentOS Linux release 6.0 (Final)
[root@jmnote ~]# cat /etc/centos-release
CentOS Linux release 6.0 (Final)
[root@jmnote ~]# cat /etc/system-release
CentOS Linux release 6.0 (Final)
[root@jmnote ~]# rpm -q centos-release
centos-release-6-0.el6.centos.5.i686
</source>


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


<source lang='dos'>
;실행예시 (Fedora 11 Leonidas)
[root@jmnote ~]# cat /etc/issue
<syntaxhighlight lang='console'>
CentOS release 5.7 (Final)
[root@zetawiki ~]# rpm -qa *-release
Kernel \r on an \m
fedora-release-11-1.noarch
</source>
</syntaxhighlight>


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


<source lang='dos'>
;실행예시 (SUSE Linux Enterprise Server 11)
[root@jmnote ~]# uname -r
<syntaxhighlight lang='console'>
2.6.18-274.7.1.el5
zetawiki:~ # rpm -qa *-release
[root@jmnote ~]#
sles-release-11.1-1.152
</source>
lsb-release-2.0-1.2.18
</syntaxhighlight>


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