Use the lscpu command to get CPU/Processor information on Linux

There are a lot of ways to get information about your system’s cpu. You can either dump the contents of /proc/cpuinfo file, lshw or my recent discovery "lscpu". This utility gathers all the data from sysfs, /proc/cpuinfo file as well and shows it in a human readable format.

It doesn’t show a lot of information as compared to its other alternatives but this is usually all you need.

[shredder12]$ lscpu

Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
CPU(s):                2
Thread(s) per core:    1
Core(s) per socket:    2
CPU socket(s):         1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 15
Stepping:              13
CPU MHz:               800.000
L1d cache:             32K
L1i cache:             32K
L2 cache:              2048K

If you need parsable info for your code then use the “-p” option.

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <img> <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote> <h1> <h2> <h3> <h4> <h5> <h6> <p> <br>
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Image links with 'rel="lightbox"' in the <a> tag will appear in a Lightbox when clicked on.

More information about formatting options

Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.