If you're on linux you can usually just do:
shuf -n 5 /usr/share/dict/words
On Mac OS X you need coreutils for shuf, which you can get from brew (it's called gshuf once installed).