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.

link|improve this question

36% accept rate
You have configured your VM to have more than CPU, right? (Just making sure) – Daniel Beck Feb 18 '11 at 6:21
feedback

2 Answers

This should work:

grep -c processor /proc/cpuinfo

or

lshw -class processor -short
link|improve this answer
feedback

This command will do the job: dmesg | grep cpu

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.