以下のディストリビュージョンで確認。
openSUSE 13.2
# cat /etc/os-release
NAME=openSUSE
VERSION="13.2 (Harlequin)"
VERSION_ID="13.2"
PRETTY_NAME="openSUSE 13.2 (Harlequin) (x86_64)"
ID=opensuse
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:opensuse:13.2"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://opensuse.org/"
ID_LIKE="suse"
/etc/SuSE-releaseは、なくなる方向みたい・・・。
# cat /etc/SuSE-release
openSUSE 13.2 (x86_64)
VERSION = 13.2
CODENAME = Harlequin
# /etc/SuSE-release is deprecated and will be removed in the future, use /etc/os-release instead
openSUSE 12.2
13.2で/etc/os-release無くなるならと思い、
12.2でも確認。
# cat /etc/os-release
NAME=openSUSE
VERSION="12.2 (Mantis)"
VERSION_ID="12.2"
PRETTY_NAME="openSUSE 12.2 (Mantis) (x86_64)"
ID=opensuse
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:opensuse:12.2"
/etc/SuSE-releaseだと・・・
# cat /etc/SuSE-release
openSUSE 12.2 (x86_64)
VERSION = 12.2
CODENAME = Mantis
/etc/os-releaseでいいみたい。
openSUSE 11.1
# cat /etc/SuSE-release
SUSE LINUX Enterprise Server 11 (X86-64)
VERSION = 11.1
ちなみに、/etc/os-releaseは存在しない。
# cat /etc/os-release
cat: /etc/os-release: No such file or directory