Oxygen is used in respiration in most organisms. The fungi include species that are obligately aerobic or obligately anaerobic (eg rumen fungi). LINK However many fungi are in between, with the capacity to function facultatively in aerobic and anaerobic conditions. Oxygen is used for oxidative metabolism, to generate energy. However, it is also essential for biosynthesis of sterols, unsaturated fatty acids and some vitamins. Thus, while many fungi can exist in anaerobic conditions and respire fermentatively, they also have the capacity to transport oxygen or the products of respiration through their cytoplasm, or air in air spaces of the rhizomorph.
The presence of carbon dioxide is also required for some fungi. It is used in heterotrophic carbon fixation, commonly to replace the carbon backbone from the tricarboxylic acid cycle lost to amino acid formation.