Linux

  
の現在のバージョンを表示する方法

Linuxのバージョンを表示するには、主に3つの方法があります。

1)サーバーにログインし、lsb_release -aを実行してすべてのバージョン情報を表示します。 > [[email protected]〜]#lsb_release -a LSBバージョン:1.3配布者ID:RedHatEnterpriseAS説明:Red Hat Enterprise Linux ASリリース4(Nahant Update 1)リリース:4コード名:NahantUpdate1 [[email protected]〜] ]#

このコマンドはRedhat、SuSE、Debianなどを含むすべてのLinuxディストリビューションに適用されます。

2)Linuxにログインし、cat /etc /redhat-releaseを実行します。例えば、次のようにします。[[email protected]〜]#cat /etc /redhat-release Red Hat Enterprise Linux ASリリース4(Nahant) Update 1)[[email protected]〜]#

このようにしてAS4 Update 1のように特定のバージョン番号を直接見ることができます。

3)linuxにログインしてrpmを実行します。 -q redhat-release、例えば、

[[email protected]〜]#rpm -q redhat-releaseredhat-release-4AS-2.4 [[email protected]〜]#

redhat-release- 3AS-1 - > Redhat Enterprise Linux AS 3 redhat-release-3AS-7.4 - > Redhat Enterprise Linux AS 3アップデート4redhat-release-4AS-2 - > Redhat Enterprise Linux AS 4 redhat-4AS-2.4 - > Redhat Enterprise Linux AS 4アップデート1 redhat-release-4AS-3 - > Redhat Enterprise Linux AS 4アップデート2redhat-release-4AS-4.1 - > Redhat Enterprise Linux AS 4アップデート3 redhat-release-4AS-5 5 - > Redhat Enterprise Linux AS 4アップデート4

注:2つの方法(2)(3)はRedhat Linuxにのみ有効です。

Copyright © Windowsの知識 All Rights Reserved