Dust temperature is an important property of the interstellar medium (ISM) of galaxies. It is required when converting (sub)millimeter broadband flux to total infrared luminosity (L_IR), and hence star formation rate, in high-z galaxies. However, different definitions of dust temperatures have been used in the literature, leading to different physical interpretations of how ISM conditions change with, e.g., redshift and star formation rate. In this paper, we analyse the dust temperatures of massive (M* > 10^10 Msun) z=2-6 galaxies with the help of high-resolution cosmological simulations from the Feedback in Realistic Environments (FIRE) project. At z~2, our simulations successfully predict dust temperatures in good agreement with observations. We find that dust temperatures based on the peak emission wavelength increase with redshift, in line with the higher star formation activity at higher redshift, and are strongly correlated with the specific star formation rate. In contrast, the mass-weighted dust temperature does not strongly evolve with redshift over z=2-6 at fixed IR luminosity but is tightly correlated with L_IR at fixed z. The mass-weighted temperature is important for accurately estimating the total dust mass. We also analyse an equivalent dust temperature for converting (sub)millimeter flux density to total IR luminosity, and provide a fitting formula as a function of redshift and dust-to-metal ratio. We find that galaxies of higher equivalent (or higher peak) dust temperature (warmer dust) do not necessarily have higher mass-weighted temperatures. A two-phase picture for interstellar dust can explain the different scaling relations of the various dust temperatures.