Our present-day atmosphere is often used as an analog for potentially habitable exoplanets, but Earth's atmosphere has changed dramatically throughout its 4.5-billion-year history. For example, molecular oxygen is abundant in the atmosphere today but was absent on the early Earth. Meanwhile, the physical and chemical evolution of Earth's atmosphere has also resulted in major swings in surface temperature, at times resulting in extreme glaciation or warm greenhouse climates. Despite this dynamic and occasionally dramatic history, the Earth has been persistently habitable-and, in fact, inhabited-for roughly 4 billion years. Understanding Earth's momentous changes and its enduring habitability is essential as a guide to the diversity of habitable planetary environments that may exist beyond our solar system and for ultimately recognizing spectroscopic fingerprints of life elsewhere in the Universe.Here, we review long-term trends in the composition of Earth's atmosphere as it relates to both planetary habitability and inhabitation. We focus on gases that may serve as habitability markers (CO2, N2) or biosignatures (CH4, O2), especially as related to the redox evolution of the atmosphere and the coupled evolution of Earth's climate system. We emphasize that in the search for Earth-like planets we must be mindful that the example provided by the modern atmosphere merely represents a single snapshot of Earth's long-term evolution. In exploring the many former states of our own planet, we emphasize Earth's atmospheric evolution during the Archean, Proterozoic, and Phanerozoic eons, but we conclude with a brief discussion of potential atmospheric trajectories into the distant future, many millions to billions of years from now. All of these 'Alternative Earth' scenarios provide insight to the potential diversity of Earth-like, habitable, and inhabited worlds.