如何判断正在运行的程序在Linux中是否为64位?


23

在Mac OS X中,我可以使用“活动监视器”程序来查看正在运行的程序/进程是否为64位。我如何在Linux操作系统中做到这一点,而不管口味如何?

Answers:


34

您可以使用该file命令来检查可执行文件的格式。

例如:

$ 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.9, stripped
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.