Aircraft are not completely enclosed. The air conditioning system of the aircraft gets air from the engines. That’s why in most airliners your AC vent shuts off momentarily before you are pushed back on to the taxi way and turns on again during engine start. The environmental control system of the aircraft pressurizes the aircraft through conditioned air and regulates the pressure by managing how much air gets vented out.
Latest Answers