Optogenetics – the use of optically-activated proteins to control neuronal function – is a recent development in neuroscience methodology. Optogenetic techniques provide a means of activating or inhibiting distinct populations of neurons with an unprecedented degree of spatial, temporal, and neurochemical precision. Channelrhodopsin-2 (ChR2), an algal protein from Chlamydomonas reinhardtii, is a light-activated cation channel capable of inducing depolarization and action potentials in neurons. Three protocols are presented in this unit for the use of ChR2, with emphasis on technical aspects of fiber optics. The first describes the use of ChR2 in electrophysiological recordings from brain slices. The second and third involve the use of ChR2 in vivo, with light delivered through chronic fiber implants or guide cannula.