Stress test CPU & Memory in Ubuntu

stress is a command line tool you can use to stress test CPU and Memory in Linux. An example could be:

stress --cpu 8