Carbyne, the sp1-hybridized phase of carbon, is still a missing link in the family of carbon allotropes. While the bulk phases of carbyne remain elusive, the elementary constituents, that is, linear chains of carbon atoms, have already been observed using the electron microscope. Isolated atomic chains are highly interesting one-dimensional conductors that have stimulated considerable theoretical work. Experimental information, however, is still very limited. Here we show electrical measurements and first-principles transport calculations on monoatomic carbon chains. When the 1D system is under strain, the chains are semiconducting corresponding to the polyyne structure with alternating bond lengths. Conversely, when the chain is unstrained, the ohmic behaviour of metallic cumulene with uniform bond lengths is observed. This confirms the recent prediction of a metal-insulator transition that is induced by strain. The key role of the contacting leads explains the rectifying behaviour measured in monoatomic carbon chains in a nonsymmetric contact configuration.