The thermal properties of insulating, crystalline materials are essentially determined by their phonon dispersions, the finite-temperature excitations of their phonon populations-treated as a Bose-Einstein gas of harmonic oscillators-and the lifetimes of these excitations. The conceptual foundations of this picture are now a well-established cornerstone in the theory of solids. However, only in recent years our theoretical and algorithmic capabilities have reached the point where we can now determine all these quantities from first-principles, i.e. from a quantum-mechanical description of the system at hand without any empirical input. Such advances have been largely due to the development of density-functional perturbation theory that allows to calculate second-and third-order perturbations of a system of interacting electrons with a cost that is independent of the wavelength of the perturbation. Here we present an extensive case study for the phonon dispersions, phonon lifetimes, phonon mean free paths, and thermal conductivities for isotopically pure silicon and germanium, showing excellent agreement with experimental results, where available, and providing much needed microscopic insight in the fundamental atomistic processes giving rise to thermal conductivity in crystals.