Step-by-step explanation:
There are a few examples of different type of molecules that have a linear geometry:
1) Diatomic molecules
Diatomic molecules always have a linear geomerty given that its their only possiblility.
Some examples are: Oxygen (O2), Nitrogen (N2), Fluorine (F2), Choridic acid (HCl).
2) Triatomic molecules with no lone pair electrons
In this case, the absence of lone pair electrons keeps a linear geometry in molecules such a carbon dioxide (CO2).
If the molecule would have this electrons the repulsion generated between them and the electrons from the atomic bonds would create an angular geometry.