Linux Find Out CPU Architecture Information

How do I find out my CPU architecture information under Linux operating systems using the command line?

You can use the /proc/cpuinfo file or use the lscpu command to get info about CPU architecture. It will display information like:
  • Number of CPUs
  • Threads
  • Cores
  • Sockets
  • NUMA nodes
  • Information about CPU caches,
  • CPU family, model and stepping.
  • in human-readable format. Alternatively, it can print out in parsable
  • format including how different caches are shared by different CPUs,
  • which can also be fed to other programs.

Open a terminal and type the following command:
$ less /proc/cpuinfo
Sample outputs:

Fig.01: /etc/cpuinfo is a collection of CPU and system architecture dependent item on Linux

Fig.01: /etc/cpuinfo is a collection of CPU and system architecture dependent item on Linux

$ lscpu
Sample outputs:
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                8
On-line CPU(s) list:   0-7
Thread(s) per core:    2
Core(s) per socket:    4
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 58
Model name:            Intel(R) Core(TM) i7-3840QM CPU @ 2.80GHz
Stepping:              9
CPU MHz:               1206.201
CPU max MHz:           3800.0000
CPU min MHz:           1200.0000
BogoMIPS:              5581.50
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              8192K
NUMA node0 CPU(s):     0-7
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts


  1. Architecture: The architecture of your CPU. In this case, it is x86_64 (AMD64).
  2. CPU : The logical CPU number of a CPU.
  3. CACHE : Information about how caches are shared between CPUs i.e. L1/L2/L3 cpus.

Related media

You can see the lscpu command output using the following video:

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 13 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf duf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Modern utilitiesbat exa
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg glances gtop jobs killall kill pidof pstree pwdx time vtop
Searchingag grep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
13 comments… add one
  • vamsi May 27, 2011 @ 4:07


    is this file dynamically generated or cached ?
    can we edit this file ?

    Thanks !

  • Tapas Mallick Jun 7, 2011 @ 11:38

    is “lscpu” available for redhat and its variants ? It is really a cool command/tool to have with all Linux System Administrator.

    • Philippe Petrinko Jun 7, 2011 @ 12:53


      If [lscpu] does not exist for your distribution, you can always create a shell alias to create a shortcut of the following command

      alias lscpu=”/bin/cat /proc/cpuinfo|/bin/grep -E ‘processor|model name|cache size|core|sibling|physical'”

      Then afterwards, you can use this command anywhere.
      Just add it to your personal Bash customization startup file, located into your home directory, namely [ ~/.bashrc ] or sometimes specific included file [ ~/.bash-aliases ].

      Have fun !

      • Tryme Jun 7, 2011 @ 13:22


        Useless use of cat???

        alias lscpu=”/bin/grep -E 'processor|model name|cache size|core|sibling|physical' /proc/cpuinfo”


        lscpu command available on latest version of Ubuntu, Debian, RHEL 6 and above.

  • Philippe Petrinko Jun 7, 2011 @ 15:02

    “Useless use of cat?”

    Yeah, quite right, of course.

    alias lscpu=’/bin/grep -E “processor|model name|cache size|core|sibling|physical” /proc/cpuinfo’

    This will do the trick!

    • Tapas Mallick Jun 8, 2011 @ 7:11

      Appreciate your comment, but a vanilla grepping of /proc/cpuinfo with specified fields are not enough to get lscpu like detailed output. Its lacking of “Number of Physical CPU, Core per CPU, Threads in each Core, L1/D1/D3 Cache size, CPU Mode, Virtualization Technology Used, NUMA Node ID”. Of course bit sophisticated grepping/sorting/uniq on /proc/cpuinfo with generate the required output, still precompiled version of lscpu will be a great add-on for systemadmins.

  • vijay gupta Jun 9, 2011 @ 10:52

    Really helpful commands.

  • david Jun 23, 2011 @ 3:26

    thankz for the article…i was searching for this…

  • eepeesalimep Dec 26, 2011 @ 6:17


    how we can check processor types like (dual core ,quadcore ) in linux mechine
    suppose my cpuimfo out put like Intel Xeon(R) CPUX5355 @ 2.66GHz how i know this is dualcore or quad core processor ?

  • Gorth Durak Jul 18, 2012 @ 2:52

    as a c++ guy, I’m trying to get my barecomputer_o (Vettrasoft Z Directory object)
    working on Debian linux – is there a [c function] OS API to get CPU info? I can
    fork()/exec() or do system(“lscpu > /tmp/somefile”) and do a bunch fo grunt
    Quick&Dirty hacking, not elegant
    In microsoft-land, I use a combo of __cpuid (CPUInfo, 0); and embedded assembler,

    #if zos_MSWindows
            mov     eax,    1
            mov     EAXBuf, eax     // version
            mov     EBXBuf, ebx     // brand idx, max # CPUs
            mov     ECXBuf, ecx     // extended feature info
            mov     EDXBuf, edx     // feature info
        m_SteppingID = EAXBuf & 0x0000000F;
        m_Model      = EAXBuf & 0x000000F0;
        m_FamilyID   = EAXBuf & 0x00000F00;
        m_Model    >>= 4;
        m_FamilyID >>= 8;
        // etc etc.
  • Babin Lonston Oct 19, 2013 @ 10:37

    Its cant Editable Proc will get created while the system boots every time in RAM , U can create it manually if your Root User

  • julio Jun 13, 2017 @ 14:30

    The terminal scares the heck out of me but this command is useful a very simple.
    Thank you very much.

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum