Molecular dynamics simulations and quantum transport theory are employed to study the electronic properties of various zigzag and armchair carbon nanotubes (CNTs) under uniaxial compressive and tensile strains. It is found that the transfer integral decreases as the tensional strain increases. Furthermore, in the (3N+1,0) and (3N,0) zigzag nanotubes, the current induced by the application of a suitable bias voltage varies linearly with the magnitude of the applied strain. Thus, these particular zigzag CNTs are suitable for use as nanoscale strain sensors. Furthermore, the wider detected ranges occur in the smaller diameter of (3N,0) and (3N+1,0) tubes. However, in (11,0) zigzag nanotube and (5,5) armchair nanotube, the variation in current is not in accordance with Ohm’s law with respect to variations in the applied strain. Specifically, the electronic resistance decreases with increasing strain in (11,0) zigzag nanotube, while the current variations in different strains show the irregular and small perturbation in (5,5) armchair nanotube. Accordingly, neither the (11,0) zigzag nanotube nor the (5,5) armchair nanotube is suitable for strain sensing applications, but the (5,5) armchair nanotube has a current with the stable property for a conducting wire.