Linux OS 버전 확인 / CentOS / Ubuntu
페이지 정보
본문
[ CentOS 6.x ]
1. lsb_release 로 버전 확인하기
[root@localhost local]# Isb_release -a
-bash: Isb_release: command not found
lsb_release 에러가 날때는 아래 2개의 패키지를 설치합니다.
# yum provides */lsb_release
# yum install redhat-lsb
[root@localhost local]# Isb_release -a
LSB Version: :base-4.0-amd64:base-4.0-moarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.8 (Final)
Release: 6.8
Codename: Final
2. rpm 으로 버전 확인하기
[root@localhost local]# rpm -qa | grep release
CentOS Linux release 6.8 (Final)
3. cat 으로 버전 확인하기
[root@localhost local]# cat /etc/redhat-release
CentOS release 6.8 (Final)
[ CentOS 7.x ]
1. rpm 으로 버전 확인하기
[root@localhost local]# rpm -qa | grep release
centos-release-7-3.1611.el7.centos.x86_64
2. cat 으로 버전 확인하기
[root@localhost local]# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)
[ OS bit 확인하기 ]
[happyjung@www www]$ getconf LONG_BIT
32
[ Ubuntu 18.x ]
root@happyjung:/# /etc/*-release
bash: /etc/lsb-release: Permission denied
root@happyjung:/# cat /etc/*-release | uniq
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"
NAME="Ubuntu"
VERSION="18.04.1 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.1 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
root@happyjung:/# cat /etc/issue
Ubuntu 18.04.1 LTS \n \l
root@happyjung:/# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"
root@izar_srv:/etc/apache2/conf-available#
관련자료
https://kldp.org/node/109636
https://kenno.wordpress.com/2012/10/21/centos-lsb_release-command-not-found/
http://ongal.tistory.com/190
https://zetawiki.com/wiki/리눅스_종류_확인,_리눅스_버전_확인
http://funnymins.tistory.com/102
1. lsb_release 로 버전 확인하기
[root@localhost local]# Isb_release -a
-bash: Isb_release: command not found
lsb_release 에러가 날때는 아래 2개의 패키지를 설치합니다.
# yum provides */lsb_release
# yum install redhat-lsb
[root@localhost local]# Isb_release -a
LSB Version: :base-4.0-amd64:base-4.0-moarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.8 (Final)
Release: 6.8
Codename: Final
2. rpm 으로 버전 확인하기
[root@localhost local]# rpm -qa | grep release
CentOS Linux release 6.8 (Final)
3. cat 으로 버전 확인하기
[root@localhost local]# cat /etc/redhat-release
CentOS release 6.8 (Final)
[ CentOS 7.x ]
1. rpm 으로 버전 확인하기
[root@localhost local]# rpm -qa | grep release
centos-release-7-3.1611.el7.centos.x86_64
2. cat 으로 버전 확인하기
[root@localhost local]# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)
[ OS bit 확인하기 ]
[happyjung@www www]$ getconf LONG_BIT
32
[ Ubuntu 18.x ]
root@happyjung:/# /etc/*-release
bash: /etc/lsb-release: Permission denied
root@happyjung:/# cat /etc/*-release | uniq
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"
NAME="Ubuntu"
VERSION="18.04.1 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.1 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
root@happyjung:/# cat /etc/issue
Ubuntu 18.04.1 LTS \n \l
root@happyjung:/# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"
root@izar_srv:/etc/apache2/conf-available#
관련자료
https://kldp.org/node/109636
https://kenno.wordpress.com/2012/10/21/centos-lsb_release-command-not-found/
http://ongal.tistory.com/190
https://zetawiki.com/wiki/리눅스_종류_확인,_리눅스_버전_확인
http://funnymins.tistory.com/102
댓글목록
등록된 댓글이 없습니다.