Ubuntu – simple UNIX command for finding out how many cores I have to work with

coremacmulti-coreUbuntu

I've got an Ubuntu VM on my Mac. Is there a command I can run in Ubuntu that will tell me how many cores I have to work with?

I could do "about this mac" on the host, but I'm not sure how well the multi-core processor would translate to the VM.

Best Answer

This should work:

grep -c processor /proc/cpuinfo

or

lshw -class processor -short
Related Question