Carbon dioxide (CO(2)) and oxygen (O(2)) are important cues that can signal the presence of food, predators, and environmental stress. Here we will review recent studies on the mechanisms of how the olfactory system detects these two molecules. In both vertebrates and invertebrates, the two molecules are detected by subsets of specialized olfactory neurons. In addition, the signal transduction cascades for sensing these two gases appear to be different from those for sensing typical odorants. CO(2) and O(2) signals can evoke stereotypical innate behaviors such as attraction and avoidance in many animal species. Future studies on the neural pathways underlying CO(2) and O(2) sensing may shed light on the circuit mechanisms of these behaviors.