How to Copy ( CTRL L ) Object Data to Many Objects while keeping all their Transforms ( Location Rotation & Scale )
If you want blue cubes to stay in their position after you link their mesh data to the gray cube, you need to reset their origin to their individual centers.

You can use that devil shortcut Ctrl+Alt+Shift+C for that.

I hope it is what you are going to achieve :)



Here is your .blend with this "fix" applied.