First, why would you want to do this? Maybe for testing, to check the responsiveness of the computer under load. Also to force the fans to run to check that they work, and also to help clear water in case of a water spill!
Use this command: yes > /dev/null &
This creates a background task which will send the word "yes" as often as possible (it is usually used to answer commands with repeated prompts to continue).
Repeat the command to create more threads. Do this as often as necessary to put the required load on the computer.
When your testing is complete, terminate them all with: killall yes
I usually write a blog post about once a week. The latest post can be viewed here: Avoid Microsoft: If you don't really like computers much you could make things a bit better for yourself. (posted 2024-12-04 at 12:05:50). I do podcasts too!. You can listen to my latest podcast, here: OJB's Podcast 2024-11-18 Unity Through Division: Sometimes hard decisions need to be made to make genuine progress..