The terrestrial atmospheres were mostly degassed or sweated out from the inside of our rocky planets through magma ocean solidification, later volcanic activity, or a combination of both #BCsci19
We don't actually know which hypothesis (Endogenous or Exogenous) is correct, and the best answer is probably that both occurred. I wold like to have a more clear-cut answer!! #BCsci19