Electron cryotomography (ECT) enables intact cells to be visualized in 3D in an essentially native state to 'macromolecular' (∼4 nm) resolution, revealing the basic architectures of complete nanomachines and their arrangements in situ. Since its inception, ECT has advanced our understanding of many aspects of prokaryotic cell biology, from morphogenesis to subcellular compartmentalization and from metabolism to complex interspecies interactions. In this Review, we highlight how ECT has provided structural and mechanistic insights into the physiology of bacteria and archaea and discuss prospects for the future.