开发者

How to find the processor / chip architecture on Linux

What command should I use to find the processor / chip architecture on Linux?

linux-x86-32
linux-x86-64
开发者_JAVA技巧linux-ppc-64


To display kernel architecture: uname -p

To display extended CPU details: cat /proc/cpuinfo


In the terminal, type

lscpu

which returns output like this:

Architecture:          i686
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                2
On-line CPU(s) list:   0,1
Thread(s) per core:    1
Core(s) per socket:    2
Socket(s):             1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 23
Stepping:              6
CPU MHz:               2670.000
BogoMIPS:              5320.13
L1d cache:             32K
L1i cache:             32K
L2 cache:              3072K

To only get the architecture:

lscpu | grep Architecture

Which in this case is

Architecture:          i686

See man lscpu for more.


I'm surprised no one suggested uname -m. On my laptop, this gives armv7l, while uname -a gives me a monstrous two lines of text.


see (man uname):

echo `uname -s`-`uname -p`


A concise command producing information about the current machine is hostnamectl. Example output:

Static hostname: xxxx
Icon name: computer-laptop
Chassis: laptop
Boot ID: b3a1f952c514411c8c4xxxxxxxxxxxx
Operating System: Ubuntu 14.04.3 LTS
Kernel: Linux 3.19.0-43-generic
Architecture: x86_64

It gives you the most basic information about your machine. Other commands like uname, lsb_release, or lscpu return more specific information.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜