The production and guiding of ground state and metastable C, N, and O atoms in a two-meter-long, bent magnetic guide are described. Pure beams of metastable He(3S1) and Ne(3P2), and of ground state N(4S3/2) and O(3P2) are obtained using an Even-Lavie valve paired with a dielectric barrier discharge or electron bombardment source. Under these conditions no electronically excited C, N, or O atoms are observed at the exit of the guide. A general valve with electron impact excitation creates, in addition to ground state atoms, electronically excited C(3P2; 1D2) and N(2D5/2; 2P3/2) species. The two experimental conditions are complimentary, demonstrating the usefulness of a magnetic guide in crossed or merged beam experiments such as those described in Henson et al. [Science 338, 234 (2012)] and Jankunas et al. [J. Chem. Phys. 140, 244302 (2014)].