TL;DR

Debian/Ubuntu

apt-get -y install stress
stress

Source: http://www.cyberciti.biz/faq/stress-test-linux-unix-server-with-stress-ng/