International audienceWe develop a thermodynamical model of fermionic dark matter halos at finite temperature. Statistical equilibrium states may be justified by a process of violent collisionless relaxation in the sense of Lynden-Bell or from a collisional relaxation of nongravitational origin if the fermions are self-interacting. The most probable state (maximum entropy state) generically has a “core-halo” structure with a quantum core (fermion ball) surrounded by an isothermal atmosphere. The quantum core is equivalent to a polytrope of index n=3/2. The Pauli exclusion principle creates a quantum pressure that prevents gravitational collapse and solves the core-cusp problem of the cold dark matter model. The isothermal atmosphere (which ...