I have created a model in blender consisting of many cubes. Now instead of UV unwrapping every single cube, how can I UV unwrap all cubes together to one UV map?
The best way IMO would be using the Texture Atlas add on as joining meshes is sometimes destructive (think you have different modifier for each object- as in my example pictured below).
Select all your objects in Object Mode, go to the Render header-->Texture Atlas panel and press the '+' button, then OK. Next press Start Manual Unwrap button. Enter Edit Mode, go to the UV Editor, select all islands (A) and pack them (Ctrl+P). Now you have all the objects' maps combined in one UV Map. Finally press Finish Manual Unwrap button to separate objects.