Very easy with Linux. Just download an ISO of your preferred distro and use Universal USB Installer
to install it to your flash drive. Set a persistent file size for storing changes between re-boots.
Here is a guide on how to do so with Ubuntu - http://www.howtogeek.com/howto/14912/create-a-persistent-bootable-ubuntu-usb-flash-drive/
I have one of these running xubuntu which I carry around all the time. It's uses are endless.