How to Quickly Warm Up Your MacBook
Source: Hacker News
Warm Up Your MacBook
You’ve been there—after putting your backpack in a frigid car, walking against the Wisconsin wind, or biking across the frozen lake, you arrive at work. You rest your palms on the keyboard to begin typing your password, and recoil in pain from the sudden cold of the metal sucking the heat from your skin.
How do you quickly warm up a laptop? Make it do a lot of work.
Using a built‑in command
A one‑line command that will peg your CPU to 100 %:
yes > /dev/null
Run that from Terminal. It repeatedly sends the word yes to the null device, using 100 % of the CPU.
Using the stress utility
If you want to stress your Mac more quickly and get your CPU hotter, try the stress utility:
brew install stress
stress -c 6 -m 2 -t 300
-c 6starts 6 CPU‑bound threads (100 % each)-m 2starts 2 memory‑allocation threads-t 300runs for 300 seconds (5 minutes) to prevent overheating if you walk away
Adding an alias
You can add an alias to ~/.bash_profile to automate the command:
alias warm='stress -c 6 -m 2 -t 300'
Example usage:
fred: bash$ warm
stress: info: [65121] dispatching hogs: 6 cpu, 0 io, 2 vm, 0 hdd
Happy winter!