There are four modes of nutrition for the kingdom Eubacteria: photoautotrophs, chemoautotrophs, photoheterotrophs and chemoheterotrophs. Each of these has a different combination of ways that they obtain energy and carbon.
Photoautotrophs are organisms that conduct photosynthesis similarly to plants, using light to generate energy and carbon dioxide to generate carbon compounds. Chemoautotrophs also use carbon dioxide to make carbon compounds, but they use inorganic chemicals as sources of energy rather than light. Photoheterotrophs obtain their energy from sunlight, but also ingest organic carbon compounds as a source of carbon. Chemoheterotrophs obtain both their energy and carbon by ingesting organic chemicals. In any case, when generating energy by metabolizing chemicals, the source of energy can be called an electron donor, and processing this donor usually requires an electron acceptor, most commonly oxygen.
Bacteria that rely on ingesting chemicals for energy can be either dependent on oxygen or can use other electron acceptors. Bacteria that generate energy from chemical compounds without oxygen either use anaerobic respiration or fermentation. Anaerobic respiration requires the use of alternate electron acceptors such as nitrates, sulfates or carbon dioxide. Bacteria that use inorganic compounds to produce energy can also commonly use hydrogen, carbon monoxide, ammonia or reduced metals. Fermentation does not use any alternate electron acceptor, instead producing waste products such as ethanol or lactic acid.