ユーザ用ツール

サイト用ツール


linux:check_distribution

Linux Distribution の確認

検索したらいくつか出てきたけど、以下が一番いい感じ。

一応、

ls -l /etc/*release*

でファイルを確認した上で

cat /etc/*release*

実施例は以下。

$ ls -l /etc/*release*
-rw-r--r--. 1 root root  38 Nov 29  2016 /etc/centos-release
-rw-r--r--. 1 root root  51 Nov 29  2016 /etc/centos-release-upstream
-rw-r--r--. 1 root root 393 Nov 29  2016 /etc/os-release
lrwxrwxrwx. 1 root root  14 Jan 17  2017 /etc/redhat-release -> centos-release
lrwxrwxrwx. 1 root root  14 Jan 17  2017 /etc/system-release -> centos-release
-rw-r--r--. 1 root root  23 Nov 29  2016 /etc/system-release-cpe

$ cat /etc/*release*
CentOS Linux release 7.3.1611 (Core)
Derived from Red Hat Enterprise Linux 7.3 (Source)
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.3.1611 (Core)
CentOS Linux release 7.3.1611 (Core)
cpe:/o:centos:centos:7

linux/check_distribution.txt · 最終更新: 2022/10/07 14:14 by hohog

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki