ubuntu check for number of cpu code example Example: linux check cpu core lscpu #or cat /proc/cpuinfo