2018年1月7日日曜日

[Linux] OSバージョン確認


【環境】
Google Cloud Platform(GCP)[VMインスタンス]上で実行
OS : Linux(Debian 9.2)

catコマンドなどで以下を実行するとバージョンが確認ができる



Linuxカーネルのバージョンを確認

$ cat /proc/version
Linux version 4.9.0-4-amd64 (debian-kernel@lists.debian.org) (gcc version 6.3.0 20170516 (Debian 6.3.0-18) ) #1 SMP Debian 4.9.65-3+deb9u1 (2017-12-23)

Debianのバージョンを確認

$ cat /etc/debian_version
9.2
または
$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"


【参考】

0 件のコメント:

コメントを投稿