If we look at the compound, we will understand that the underlined carbon is in sp hybridization. Recall that sp hybridization leads to a C-C bond angle of about 180°. When two chemical species are at a bond angle if 180°, then the both bonding groups are found to be on a straight line.
Hence, for any carbon in a triply bonded state or indeed any carbon atom that is in an sp will exhibit a linear geometry according to the Valence Shell Electron Pair repulsion Theory since there are two electron pairs present.