如何确定linux操作系统是32位还是64位的?

只要只用以下几个命令即可实现。

5种查看linux操作系统是多少位的方法:

$HOSTTYPE

Definition: $HOSTTYPE: Automatically set to a string that uniquely describes the type of machine on which bash is executing. The default is system-dependent.

$HOSTTYPE 自动的设置为一个字符串类型,用于描述PC运行的是哪类bash。默认值为 system-dependent(系统相关)。