アカウント名:
パスワード:
$ lsb_release -aNo LSB modules are available.Distributor ID: DebianDescription: Debian GNU/Linux 11 (bullseye)Release: 11Codename: bullseye
Debian/Ubuntu限定。RedHat系などは使ってないので知らない。
openSUSEだと、こんな感じです。
gw252:~> lsb_release -aLSB Version: n/aDistributor ID: openSUSEDescription: openSUSE Leap 15.3Release: 15.3Codename: n/a
Alpine Linuxには、lsb_releaseコマンドは入ってないようですね。
fedora には標準では入ってないけど、
% dnf provides lsb_releaseredhat-lsb-core-4.1-56.fc36.x86_64 : LSB Core module supportRepo : fedora一致:ファイル名 : /usr/bin/lsb_release
わざわざインストールする気にはなれないので、後はパス。
今なら/etc/os-releaseファイルを使うのがいいと思います。今はたいていのLinuxディストリビューションで用意されています。
https://www.freedesktop.org/software/systemd/man/os-release.html [freedesktop.org]
Debian
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"NAME="Debian GNU/Linux"VERSION_ID="11"VERSION="11 (bullseye)"VERSION_CODENAME=bullseyeID=debianHOME_URL="https://www.debian.org/"SUPPORT_URL="https://www.debian.org/support"BUG_REPORT_URL="https://bugs.debian.org/"
CentOS
VERSION="7 (Core)"ID="centos"ID_LIKE="rhel fedora"VERSION_ID="7"
より多くのコメントがこの議論にあるかもしれませんが、JavaScriptが有効ではない環境を使用している場合、クラシックなコメントシステム(D1)に設定を変更する必要があります。
「科学者は100%安全だと保証できないものは動かしてはならない」、科学者「えっ」、プログラマ「えっ」
lsb_release(1)はバージョン確認に便利なんだけど (スコア:2, すばらしい洞察)
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
Debian/Ubuntu限定。
RedHat系などは使ってないので知らない。
Re: (スコア:0)
openSUSEだと、こんな感じです。
gw252:~> lsb_release -a
LSB Version: n/a
Distributor ID: openSUSE
Description: openSUSE Leap 15.3
Release: 15.3
Codename: n/a
Alpine Linuxには、lsb_releaseコマンドは入ってないようですね。
Re: (スコア:0)
fedora には標準では入ってないけど、
わざわざインストールする気にはなれないので、後はパス。
Re: (スコア:0)
今なら/etc/os-releaseファイルを使うのがいいと思います。今はたいていのLinuxディストリビューションで用意されています。
https://www.freedesktop.org/software/systemd/man/os-release.html [freedesktop.org]
Debian
CentOS