在 Red Hat Enterprise Linux 系統中,如何快速確認目前安裝的具體 release 版本號?
最直接的方法是在終端機執行 lsb_release -a 指令,該指令會列出完整的 LSB(Linux Standard Base)資訊,包含發行版 ID、描述、版本號與代號。
已在 Red Hat Enterprise Linux 4 與 5 平台測試通過。
[root@localhost ~]# lsb_release -a LSB Version: :core-3.0-ia32:core-3.0-noarch:graphics-3.0-ia32:graphics-3.0-noarch Distributor ID: RedHatEnterpriseAS Description: Red Hat Enterprise Linux AS release 4 (Nahant Update 4) Release: 4 Codename: NahantUpdate4
lsb_release,可透過 yum install redhat-lsb 安裝。/etc/redhat-release 檔案快速取得版本字串。