Virtualization
Perhaps obvious, but might be helpful.
Most languages have compilers/interpreters/emulators available for free download (google is your friend). What may be harder is that those compilers/interpreters/emulators may only be available for a limited set of common OSes, for example bash on *nix or powershell on windows. While many of us will have what I consider the three common OSes (Linux, OSX, Windows) available at all times, this is not necessarily a given.
One way around this is virtualization. These days it is a simple matter to install a virtualization environment on your workstation of choice, and then install arbitrary OSes in VMs.
Common virtualization environments (some with free downloads) include:
Then you'll need to find the OS to run in the VM.
- Linux is very easy to find. Ubuntu is often recommended for non-Linux users and IMO has a wealth of support information online
- Windows VMs for testing are available here
- OSX. Hmm, ok you'll need Apple hardware for that to comply with the EULA (even though recent OSX can be installed in a VM)