  QSO absorption spectroscopy provides a sensitive probe of both the neutral
medium and diffuse ionized gas in the distant Universe. It extends 21cm maps of
gaseous structures around low-redshift galaxies both to lower gas column
densities and to higher redshifts. Combining galaxy surveys with
absorption-line observations of gas around galaxies enables comprehensive
studies of baryon cycles in galaxy outskirts over cosmic time. This Chapter
presents a review of the empirical understanding of the cosmic neutral gas
reservoir from studies of damped Lya absorbers (DLAs). It describes the
constraints on the star formation relation and chemical enrichment history in
the outskirts of distant galaxies from DLA studies. A brief discussion of
available constraints on the ionized circumgalactic gas from studies of lower
column density Lya absorbers and associated ionic absorption transitions is
presented at the end.
