LoginSignup
4
2

More than 5 years have passed since last update.

(今更)稼働中の Linux が 32ビット版か 64bit 版かを確認する方法

Last updated at Posted at 2018-06-29

一般的に、タイトルを実現する方法としてよく知られている方法は

[hoge@fuga ~]$ uname -m
x86_64

上記コマンドの結果が x86_64 か i686 かどうかで 64bit版か 32bit版かがわかる、というものである・・・が、
64bit VMWare 鯖上の 32bit 仮想マシンで上記コマンドを実行しても
x86_64 が返ってくるんですよ・・・

ということで

[hoge@fuga ~]$ getconf LONG_BIT
64

こっちが正解。戻り値が文字列ではなく数値という点もでかいし、RaspberryPI でも使える。

4
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
2