Despite the lack of internal compartmentalization, bacterial metabolism is complex, and is far more diverse than eukaryotic metabolism. Within the Eubacteria there are species that perform virtually every biochemical reaction known (and much bacterial chemistry remains to be discovered). Most of the vitamins humans require in our diet can be synthesized by bacteria, including the vitamin K humans absorb from the Escherichia coli (E. coli) bacteria in our large intestines.
The broadest and most significant metabolic distinction among the Eubacteria is based on the source of energy they use to power their metabolism. Like humans, many bacteria are heterotrophs, consuming organic (carbon-containing) high-energy compounds made by other organisms. Other bacteria are chemolithotrophs, which use inorganic high-energy compounds, such as hydrogen gas, ammonia, or hydrogen sulfide. Still others are phototrophs, using sunlight to turn simple low-energy compounds into high-energy ones, which they then consume internally.
For all organisms, extraction of energy from high-energy compounds requires a chemical reaction in which electrons move from atoms that bind them loosely to atoms that bind them tightly. The difference in binding energy is the profit available for powering other cell processes. In almost all eukaryotes, the ultimate electron acceptor is oxygen, and water and carbon dioxide are the final waste products. Some bacteria use oxygen for this purpose as well. Others use sulfur (forming hydrogen sulfide, which has a strong odor), carbon (forming flammable methane, common in swamps), and a variety of other compounds.
Bacteria that use oxygen are called aerobes. Those that do not are called anaerobes. This distinction is not absolute, however, since many organisms can switch between the two modes of metabolism, and others can tolerate the presence of oxygen even if they do not use it. Some bacteria die in oxygen, however, including members of the Gram positive Clostridium genus. Clostridium botulinum produces botulinum toxin, the deadliest substance known. C. tetani produces tetanus toxin, responsible for tetanus and "lockjaw," while other Clostridium species cause gangrene.