The nematode Caenorhabditis elegans has two naturally occurring sexes: a self-fertile XX hermaphrodite that first produces sperm, then oocytes, and an XO male. The primary determinant of sex is the X:A ratio, the number of X chromosomes to sets of autosomes. The X:A ratio regulates not only sex determination, but also dosage compensation. In the intervening years since the identification of the X:A ratio, most of the key regulatory genes that respond to the X:A ratio have been genetically identified and ordered into regulatory hierarchies. Advances have also been made in identifying the X chromosome numerator elements of the X:A ratio. This review highlights the genetic, molecular, and biochemical approaches that have led to an understanding of how these genes interact to control sex determination and dosage compensation. The review also discusses the differences between the control of sexual cell fate in the soma and germ line of C. elegans and addresses the role of germ-line-specific regulation in controlling the sperm-oocyte decision in the hermaphrodite germ line. Finally, strategies that take advantage of the availability of the entire C. elegans genome sequence, which is expected to be completed in 1998, are discussed for identifying hitherto unidentified genes that may play a role in the control of sexual cell fate.