How to check CPU cores?

QuestionsQuestions4 SkillsProTune System PerformanceOct, 04 2025
0225

You can check the number of CPU cores on your system using various commands depending on your operating system. Here are some common methods:

On Linux

  1. Using lscpu command:

    lscpu
    
  2. Using /proc/cpuinfo:

    grep -c ^processor /proc/cpuinfo
    
  3. Using nproc:

    nproc
    

On macOS

  1. Using sysctl:
    sysctl -n hw.physicalcpu
    

On Windows

  1. Using Command Prompt:

    echo %NUMBER_OF_PROCESSORS%
    
  2. Using PowerShell:

    Get-WmiObject -Class Win32_ComputerSystem | Select-Object NumberOfLogicalProcessors
    

These commands will provide you with the number of CPU cores available on your system.

0 Comments

no data
Be the first to share your comment!