Shape of the molecule having sp hybridization is
We know that,
1s + 1p → 2sp hybrid orbitals
1s + 2p → 3sp2 hybrid orbitals
1s + 3p → 4sp3 hybrid orbitals
1s + 3p + 1d → 5sp3d hybrid orbitals
Now, lets have a look at how many hybrid oribtals we have.
Two sp hybrid orbitals
If we have to arrange 2 sp hybrid orbitals around central atom, so that it will have least repulsion.
→ both the orbital should be 180∘ apart from each other for having least repulsion
So, it is linear structure