DevOps

[Linux] CentOS, Ubuntu OS 버전 확인

Hyo Kim 2021. 5. 25. 08:54
728x90
반응형

리눅스(Linux)의 커널(kenel)이란?

- 하드웨어 제어 및 파일 자원등을 관리하는 OS의 핵심 부분.

 

버전확인을 위해 사용되는 cat 명령어?

- 파일 내용을 출력.

- 여러 파일을 전달 시 연속해서 출력.

 

예시

- cat { file1 }

- cat { file1 file2 file3 }


커널 버전 확인

1. 간단하게

[root@localhost /]# uname -r
3.10.0-514.16.1.el7.x86_64

 

2. 상세정보

[root@localhost /]# uname -a
Linux localhost 3.10.0-514.16.1.el7.x86_64 #1 SMP Wed Apr 12 15:04:24 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

리눅스 커널의 버전 확인

[root@localhost /]# cat /proc/version Linux version
3.10.0-514.16.1.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Wed Apr 12 15:04:24 UTC 2017

OS 버전확인

 

- CentOS / Red Hat Enterprise

[root@localhost /]# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)

 

- Ubuntu

# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04 LTS"

 

- 모든 release 파일 확인

[root@localhost /]# cat etc/*release
CentOS Linux release 7.9.2009 (Core)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
CentOS Linux release 7.9.2009 (Core)
CentOS Linux release 7.9.2009 (Core)

OS bit 확인

[root@localhost /]# getconf LONG_BIT
64

 

 

 

 

참고, 인용사이트

https://withcoding.com/109
https://sarc.io/index.php/forum/tips/535-linux-centos-ubuntu-os
https://ongal.tistory.com/190
728x90
반응형