We present a lattice study of the equation of state in Yang-Mills theory based on the exceptional G 2 gauge group. As is well-known, at zero temperature this theory shares many qualitative features with real-world QCD, including the absence of colored states in the spectrum and dynamical string breaking at large distances. In agreement with previous works, we show that at finite temperature this theory features a first-order deconfining phase transition, whose nature can be studied by a semi-classical computation. We also show that the equilibrium thermodynamic observables in the deconfined phase bear striking quantitative similarities with those found in SU(N ) gauge theories: in particular, these quantities exhibit nearly perfect proportionality to the number of gluon degrees of freedom, and the trace anomaly reveals a characteristic quadratic dependence on the temperature, also observed in SU(N ) Yang-Mills theories (both in four and in three spacetime dimensions). We compare our lattice data with analytical predictions from effective models, and discuss their implications for the deconfinement mechanism and high-temperature properties of strongly interacting, non-supersymmetric gauge theories. Our results give strong evidence for the conjecture that the thermal deconfining transition is governed by a universal mechanism, common to all simple gauge groups.