In this paper, we deal with the global exact controllability to the trajectories of the Boussinesq system posed in 2D or 3D smooth bounded domains. The velocity field of the fluid must satisfy a Navier-slip-with-friction boundary condition, and a Robin boundary condition is imposed to the temperature. We assume that one can act on the velocity and the temperature on a small part of the boundary. For the proof, we first transform the boundary control problem into a distributed control problem. Then, we prove a global approximate controllability result by adapting the strategy of Coron, Marbach, and Sueur [J. Eur. Math. Soc. (JEMS ), 22 (2020), pp. 1625--1673]; this relies on the controllability properties of the inviscid Boussinesq system and the analysis of appropriate asymptotic boundary layer expansions. Finally, we conclude with a local controllability result; as in many other cases, this can be established as a consequence of the null controllability of a linearized system through a fixed-point argument. Our contribution can be viewed as an extension of the results in [J. Eur. Math. Soc. (JEMS ), 22 (2020), pp. 1625--1673, where thermal effects were not considered. Thus, we prove that the ideas behind the controllability properties of the Euler system and the well-prepared dissipation technique can be adapted to the present situation. Furthermore, we cover all the classical boundary conditions for the temperature, that is, those of the Robin, Neumann, and Dirichlet kinds.