Yes—many fungi and many bacteria carry out aerobic cellular respiration, meaning they use oxygen as the terminal electron acceptor while breaking down organic compounds to make ATP; but this is a capability of particular species and growth conditions, not a universal trait of either group, and both groups also include organisms (or states) that respire anaerobically or ferment.

The question bundles two separate issues that are easy to conflate. The first is whether fungi and bacteria can perform aerobic respiration at all. The second is whether all fungi and bacteria do so. The answer to the first is a clear yes. The answer to the second is no. Fungi and bacteria are enormous, diverse categories spanning obligate aerobes, facultative anaerobes, aerotolerant organisms, and obligate anaerobes, and even a single species can switch strategies depending on oxygen availability. The rest of this answer explains where aerobic respiration occurs in each group, how the shared machinery works, and where the "yes" stops applying.

What "aerobic cellular respiration" actually means

Aerobic cellular respiration is the oxygen-dependent, membrane-associated process by which a cell oxidizes a substrate (often glucose or another organic molecule) and uses the released electrons to drive ATP synthesis. The defining feature is not the mere presence of oxygen but its role as the terminal electron acceptor at the end of an electron transport chain. In eukaryotes, the chain sits in the inner mitochondrial membrane; in bacteria, it sits in the plasma membrane. Oxygen accepts electrons and protons to form water, and the resulting proton gradient powers ATP synthase.

This is distinct from fermentation, which regenerates electron carriers without an external electron acceptor and yields far less ATP per substrate, and from anaerobic respiration, which uses a terminal acceptor such as nitrate, sulfate, or carbon dioxide instead of oxygen. A fungus or bacterium that is "aerobic" in the everyday sense is one that grows in air; one that carries out aerobic respiration is specifically one that runs an oxygen-terminated electron transport chain.

Fungi: predominantly aerobic, with important exceptions

Most well-known fungi are aerobes. Molds such as Aspergillus and Penicillium, the baker's and brewer's yeast Saccharomyces cerevisiae, and the cultivated mushroom Agaricus bisporus all rely on aerobic respiration when oxygen is available. In yeasts and molds, the electron transport chain and oxidative phosphorylation occur in mitochondria, just as in animal cells.

Saccharomyces cerevisiae is a useful and often misunderstood example. In the presence of oxygen and adequate sugar, it grows by aerobic respiration—but at high sugar concentrations it also ferments, producing ethanol and carbon dioxide even under aerobic conditions (the Crabtree effect). In the absence of oxygen, it ferments and cannot sustain respiratory growth unless it is supplied with lipids such as ergosterol and unsaturated fatty acids; it is therefore not a strict anaerobe but a facultative anaerobe whose respiratory capacity is oxygen-dependent. This is why brewers and bakers can use the same organism for entirely different outcomes depending on aeration and sugar.

Fungi also include genuinely anaerobic and microaerophilic forms. Ruminal fungi in the guts of cattle and sheep are obligate anaerobes that ferment plant material and do not carry out aerobic respiration. Some fungi associated with deep sediments or anoxic soils are anaerobes as well. A few yeasts are known for fermentative lifestyles under low-oxygen conditions. So "fungi carry out aerobic cellular respiration" is true as a broad statement about the group's typical metabolism, but false if read as a claim about every fungus. The accurate formulation is that the great majority of fungi are aerobic or facultatively anaerobic, with respiration in mitochondria when oxygen permits, and that certain lineages are obligate anaerobes.

Bacteria: the widest range of respiratory lifestyles

Bacteria are where the question becomes most misleading if answered with a simple yes. Bacteria collectively display every major metabolic strategy known: obligate aerobes, facultative anaerobes, microaerophiles, aerotolerant anaerobes, and obligate anaerobes. Because bacteria use their plasma membrane for the electron transport chain rather than mitochondria, the machinery looks different from eukaryotes, but the principle is the same.

Clear examples of aerobic respiration in bacteria include Pseudomonas aeruginosa, a versatile facultative anaerobe that respires with oxygen when present and can switch to nitrate respiration when it is not; Bacillus subtilis, a facultative anaerobe; and Mycobacterium tuberculosis, an obligate aerobe that depends on oxygen. Escherichia coli is a facultative anaerobe: it respires aerobically in the gut or in a well-aerated culture, and ferments or uses anaerobic respiration when oxygen is scarce.

At the other end, Clostridium species are obligate anaerobes; oxygen is toxic to them, and they do not carry out aerobic respiration at all. Methanogens are archaea rather than bacteria, but the same principle applies to strictly anaerobic prokaryotes. Lactic acid bacteria such as Lactobacillus are aerotolerant anaerobes: they tolerate oxygen but ferment rather than respire. Some bacteria are microaerophiles that require low, not atmospheric, oxygen levels.

The key distinction is that "bacteria" is not a metabolic category. It is a vast domain, and asking whether bacteria respire aerobically is like asking whether animals fly—true of many birds and insects, false of fish and mollusks.

Why the shared machinery matters

The unity behind the answer is that aerobic respiration is an ancient, widespread process. The electron transport chain, proton-motive force, and ATP synthase are homologous in the sense of functional conservation across bacteria and eukaryotes, even though the physical location differs. In bacteria the chain is in the plasma membrane; in fungi it is in the inner mitochondrial membrane. Mitochondria themselves descend from an endosymbiotic alphaproteobacterium, which is why fungal (and animal) respiration and bacterial respiration share core biochemistry.

This shared machinery explains why the answer is "yes" at the level of mechanism and "it depends" at the level of taxonomy. The capacity to respire aerobically is not a trait unique to one group; it is a widespread solution that both fungi and bacteria deploy, and both groups also include lineages that have lost or never acquired it.

Where the answer stops applying

Several boundaries deserve to be stated plainly, because the question's phrasing invites overgeneralization.

First, oxygen availability is decisive. An aerobic fungus or bacterium placed in an anoxic environment will not carry out aerobic respiration; it may ferment, respire anaerobically, or stop growing. The organism's genetic capacity and the environment's chemistry are separate facts.

Second, "aerobic" in the lab sense is not the same as "aerobic" in the ecological sense. A culture shaken in a flask is aerated; a colony on an agar surface may be oxygen-limited at its center. A fungus that is aerobic in principle can be fermenting in practice in a thick biofilm or a waterlogged soil.

Third, the terms are not mutually exclusive categories of organism. A facultative anaerobe is both an aerobic respirer and a fermenter, depending on conditions. Treating "aerobic" and "anaerobic" as fixed labels for species causes confusion; they describe metabolic modes, not identities.

Fourth, archaea are often lumped in colloquially with bacteria, and some archaea respire aerobically while others are strict anaerobes. If the question means "prokaryotes" broadly rather than bacteria strictly, the same diversity applies.

Common sources of confusion

The most common confusion is treating "fungi" and "bacteria" as if they were single metabolisms. They are not. A second confusion is equating respiration with growth in air: an organism can grow in air while fermenting, and an organism can respire while growing slowly. A third is assuming that because yeasts ferment in brewing, yeasts are fermenters rather than respirers. In fact S. cerevisiae is a facultative anaerobe whose default mode with oxygen and limiting sugar is respiration; the fermentation that brewers rely on is a response to high sugar and low oxygen.

A fourth confusion concerns the word "cellular." Aerobic respiration is a cellular process in both groups, but in bacteria the relevant membranes are not enclosed in organelles. That difference in architecture does not change the answer to whether the process occurs.

A concise way to state it

Many fungi and many bacteria carry out aerobic cellular respiration, using oxygen as the terminal electron acceptor in a membrane-bound electron transport chain, and both groups also contain organisms that ferment, respire anaerobically, or are obligate anaerobes. The correct answer is therefore "yes, commonly, but not universally," and the specific answer for any named organism depends on its species and on the oxygen available to it.