Debianのバージョンをチェックする方法

Debianバージョンの確認方法

Debianでは、cat /etc/debian_versionと入力してDebianのバージョンを表示します。

ターミナル

$ cat /etc/debian_version
9.5

または、cat /etc/issue

ターミナル

$ cat /etc/issue
Debian GNU/Linux 9 \n \l

最後のlsb-release -aは、Debianの詳細を表示します。

ターミナル

$ lsb-release -a
-bash: lsb-release: command not found
$ sudo apt-get install lsb-release

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 9.5 (stretch)
Release:        9.5
Codename:       stretch