리눅스 종류 확인, 리눅스 버전 확인 편집하기

경고: 로그인하지 않았습니다. 편집을 하면 IP 주소가 공개되게 됩니다. 로그인하거나 계정을 생성하면 편집자가 사용자 이름으로 기록되고, 다른 장점도 있습니다.

편집을 취소할 수 있습니다. 이 편집을 되돌리려면 아래의 바뀐 내용을 확인한 후 게시해주세요.

최신판 당신의 편집
1번째 줄: 1번째 줄:
;리눅스 종류 확인하기
*리눅스 종류 확인하기
;리눅스 버전 확인하기
*리눅스 버전 확인하기
;리눅스 배포판 확인하기


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


==배포판 버전 확인==
===Fedora===
===방법 1: /etc/*-release===
<source lang='dos'>
;명령어
[root@jmnote ~]# ll /etc/*-release
<syntaxhighlight lang='bash'>
-rw-r--r--. 1 root root 29 2009-05-12 07:45 /etc/fedora-release
grep . /etc/*-release
lrwxrwxrwx. 1 root root 14 2009-10-29 14:53 /etc/redhat-release -> fedora-release
</syntaxhighlight>
lrwxrwxrwx. 1 root root 14 2009-10-29 14:53 /etc/system-release -> fedora-release
<syntaxhighlight lang='bash'>
[root@jmnote ~]# cat /etc/redhat-release
cat /etc/*-release | uniq
Fedora release 11 (Leonidas)
</syntaxhighlight>
[root@jmnote ~]# cat /etc/fedora-release
 
;실행예시 (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)
</syntaxhighlight>
[root@jmnote ~]# rpm -q fedora-release
fedora-release-11-1.noarch
</source>


;실행예시 (Oracle Enterprise Linux Server 5.5)
===OEL===
<syntaxhighlight lang='console'>
Oracle Enterprise Linux Server
[root@zetawiki ~]# cat /etc/*-release | uniq
<source lang='dos'>
[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)
Red Hat Enterprise Linux Server release 5.5 (Tikanga)
[root@jmnote ~]# rpm -q enterprise-release
</syntaxhighlight>
enterprise-release-5-0.0.22
</source>


;실행예시 (SUSE Linux Enterprise Server 11)
===CentOS===
<syntaxhighlight lang='console'>
<source lang='dos'>
zetawiki:~ # cat /etc/*-release | uniq
[root@jmnote ~]# ll /etc/*-release
SUSE Linux Enterprise Server 11 (x86_64)
-rw-r--r-- 1 root root 27 Aug 29 20:00 /etc/redhat-release
VERSION = 11
[root@jmnote ~]# cat /etc/redhat-release
PATCHLEVEL = 1
CentOS release 5.7 (Final)
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"
[root@jmnote ~]# rpm -q centos-release
</syntaxhighlight>
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>


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


;실행예시 (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
/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)
Kernel \r on an \m (\l)
</syntaxhighlight>
 
;실행예시 (Oracle Enterprise Linux 5.5)
<syntaxhighlight lang='console'>
[root@zetawiki ~]# cat /etc/issue
Enterprise Linux Enterprise Linux Server release 5.5 (Carthage)
Kernel \r on an \m
Kernel \r on an \m
</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>
 
===방법 3: rpm (레드햇계열)===
<syntaxhighlight lang='bash'>
rpm -qa *-release
</syntaxhighlight>


;실행예시 (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 Leonidas)
<source lang='dos'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# uname -r
[root@zetawiki ~]# rpm -qa *-release
2.6.18-274.7.1.el5
fedora-release-11-1.noarch
[root@jmnote ~]#  
</syntaxhighlight>
</source>
 
;실행예시 (Oracle Enterprise Linux Server 5.5)
<syntaxhighlight lang='console'>
[root@zetawiki ~]# rpm -qa *-release
enterprise-release-5-0.0.22
</syntaxhighlight>
 
;실행예시 (SUSE Linux Enterprise Server 11)
<syntaxhighlight lang='console'>
zetawiki:~ # rpm -qa *-release
sles-release-11.1-1.152
lsb-release-2.0-1.2.18
</syntaxhighlight>


==같이 보기==
==같이 보기==
{{z컬럼3|
*[[리눅스 BIT 확인하기]]
* [[커널]]
*[[/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/ 리눅스 배포판 및 버전 확인하는 방법


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

제타위키에서의 모든 기여는 크리에이티브 커먼즈 저작자표시-동일조건변경허락 3.0 라이선스로 배포된다는 점을 유의해 주세요(자세한 내용에 대해서는 제타위키:저작권 문서를 읽어주세요). 만약 여기에 동의하지 않는다면 문서를 저장하지 말아 주세요.
또한, 직접 작성했거나 퍼블릭 도메인과 같은 자유 문서에서 가져왔다는 것을 보증해야 합니다. 저작권이 있는 내용을 허가 없이 저장하지 마세요!

취소 편집 도움말 (새 창에서 열림)

이 문서에서 사용한 틀: