Terminal 101: Stress Test Your Mac With the Yes Command

Every Monday, we'll show you how to do something new and simple with Apple's built-in command line application. You don't need any fancy software, or a knowledge of coding to do any of these. All you need is a keyboard to type 'em out!

If you've ever had an issue with your Mac that only happened when the computer was under stress (or if you just have the sudden urge to give your Mac a stress test), then there's a Terminal command for you. Apple technicians often use the "yes" command to instantly begin utilizing 100 percent of your CPU and its cores. This is great for when you need to burn in or stress a Mac (or other Unix machine). Let's take a look at how to use it.

Echoing y

By default, you can type the word "yes" into the command line, followed by enter to begin continually printing "y" to the standard out.

Echoing another word

If you're running this test on a lot of machines, and get bored by the continual string of "y" running across the screen, then you can make things more exciting by denoting your own custom string to use. To do this, type the following command into the terminal:

yes [word]

Replace "[word]" with the word that you wish to echo to the command line.

Stopping the command

To stop the "yes" command from running, and relieve the strain on your Mac, you'll navigate back to the Terminal window and press the Control + C keyboard combo.

Maxing all cores

If you have a multi-core machine, then you enter the following command, followed by a space, the "&" sign, and the exact same command to match the number of cores your machine has:

yes > /dev/null

So, if you have two cores, use the following command:

if you have three cores, this command:

and so on until you max out each core on your Mac.

To end this test and relieve the strain on your Mac, use the Control + C command, but then type the following command:

killall yes

This will ensure that all of the "yes" processes that were spawned on your computer are properly killed off and no longer continue to run. Using this method, the Terminal will not output any words to the screen.

Cory Bohon is a freelance technology writer, indie Mac and iOS developer, and amateur photographer. Follow this article's author on Twitter.

TOPICS
Latest in Macs
Apple Mac Mini M4
The powerful Apple Mac mini M4 drops to an unbelievably low-price of $499
A mockup of the possible Apple M3 Ultra logo
Performance isn't the only reason you should buy Apple's M3 Ultra Mac Studio - it's reportedly one of the most power-efficient processors too
Mac Studio on a desk
Apple Mac Studio (M3 Ultra): the ultimate creative workstation
Mac Studio from above.
New benchmark suggests Apple's M3 Ultra may not be much faster than the M4 Max - only a minor uplift in multi-core performance
Apple Mac Mini on wood desk
Forget President’s Day sales, Apple is selling an M2 Mac mini refurb for just over $300 which could be the PC bargain of the year
Sergii Figurnyi
Apple's M5 chip is rumored to be in mass production - but we're still waiting for M4 MacBook Airs
Latest in How Tos
Computer memory RAM on motherboard background
How to enable XMP
Person using a laptop.
How to check battery health of a laptop
Cheerful Female Gamer Playing Online Video Game on Personal Computer
How to quickly optimize your PC for gaming
Mobile phone with logo of video game distribution platform Steam operated by Valve on screen in front of web page
How to gift a game on Steam
Venezuela's forward #09 Jhonder Cadiz celebrates after scoring during the 2026 FIFA World Cup South American qualifiers football match between Ecuador and Venezuela, at the Rodrigo Paz Delgado stadium in Quito, on March 21, 2025 ahead of Venezuela vs Peru
Venezuela vs Peru live stream: how to watch today's FIFA World Cup 2026 qualifier anywhere online
The cast of Alone Australia season 3, standing in a knee-high body of water
How to watch Alone Australia season 3 online – stream the survival show from anywhere