Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1729553
  • 博文数量: 234
  • 博客积分: 4966
  • 博客等级: 上校
  • 技术积分: 3322
  • 用 户 组: 普通用户
  • 注册时间: 2006-11-13 01:03
文章分类

全部博文(234)

文章存档

2017年(2)

2016年(1)

2015年(8)

2014年(11)

2013年(44)

2012年(27)

2011年(22)

2010年(30)

2009年(37)

2008年(6)

2007年(45)

2006年(1)

分类: LINUX

2011-01-26 08:46:03

Linux 要如何查看作業系統是 32bits 還是 64bits?

一般都是用 uname -a, uname -m (顯示 i386 => 32bits, x86_64 => 64bits)

系統如何判斷 32bits / 64bits

在嘿嘿星期四的討論學到, Mat: 用 `file /bin/bash`, 結果非常淺顯易懂.

  • 64bits: file /bin/bash
    /bin/bash: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped
  • 32bits: file /bin/bash
    /bin/bash: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped

感謝 sshsiung 提供的方法:

  • getconf LONG_BIT # 32bits
    32
  • getconf LONG_BIT # 64bits
    64

相關網頁

阅读(1439) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2011-03-08 20:28:04

很好的, 收藏了 推荐一个博客,提供很多免费软件编程电子书下载: http://free-ebooks.appspot.com