Molecules with two electron groups around the center atom have a linear shape. Remember that single, double, and triple bonds all count as 1 electron group.