The molecule which has a linear shape is CO2. CO2 has a linear shape because it consists of two identical oxygen atoms bonded to a central carbon atom by double bonds. The carbon atom is located in the center of the molecule and the oxygen atoms are arranged symmetrically on either side. This symmetrical arrangement of atoms results in a linear shape for the molecule.