How to Max out All CPUs on a Mac (from the Terminal)

Posted by Matt Birchler
— 1 min read

Have you ever needed to max out all your CPU cores? You landed on this page, so I suspect you have a good reason! Let’s just get right to it.

You want to open up the Terminal app (found in Applications>Utilities, or just use Spotlight) and paste this text into the console and hit return:

yes > /dev/null &

This will max out one of your CPU cores. Repeat the process again for each core you would like to max. My computer has 4 cores, so I ran it 4 times. If all has gone well, your Terminal should look something like this:

You won’t see anything there, so in order to verify everything is working, open up Activity Monitor (also in the Utilities folder) and you should see a few processes called “yes” at the top inside the CPU tab.

These processes will run forever if you don’t do anything, which I’m guessing is not what you want. Simply run this command to stop each process immediately:

killall yes

That’s it, you’re Mac will be back to normal.