Theory and observation for the search for life on exoplanets via atmospheric `biosignature gases' is accelerating, motivated by the capabilities of the next generation of space- and ground-based telescopes. The most observationally accessible rocky planet atmospheres are those dominated by molecular hydrogen gas, because the low density of H2 gas leads to an expansive atmosphere. The capability of life to withstand such exotic environments, however, has not been tested in this context. We demonstrate that single-celled microorganisms (Escherichia coli and yeast) that normally do not inhabit H2-dominated environments can survive and grow in a 100% H2 atmosphere. We also describe the astonishing diversity of dozens of different gases produced by E. coli, including many already proposed as potential biosignature gases (for example, nitrous oxide, ammonia, methanethiol, dimethylsulfide, carbonyl sulfide and isoprene). This work demonstrates the utility of laboratory experiments to better identify which kinds of alien environments can host some form of possibly detectable life.