The regulation of gene expression during thymocyte development provides an ideal experimental system to study lineage-commitment processes. In particular, expression of the CD4, CD8A and CD8B genes seems to correlate well with the cell-fate decisions that are taken by thymocytes, and elucidating the molecular mechanisms that underlie the differential expression of these genes could reveal key events in differentiation processes. Here, we review examples of how gene cis elements (such as promoters, enhancers and locus control regions) and trans elements (such as transcription factors, chromatin-remodelling complexes and histone-modification enzymes) come together to orchestrate a finely tuned sequence of events that results in the complex pattern of CD4, CD8A and CD8B gene expression that is observed during thymocyte development.