Using a first-principles density-functional method we model electron transport through linear chains of monovalent atoms between two bulk electrodes. For noble-metal chains the transport resembles that for free electrons over a potential barrier whereas for alkali-metal chains resonance states at the chain determine the conductance. As a result, the conductance for noble-metal chains is close to one quantum of conductance, and it oscillates moderately so that an even number of chain atoms yields a higher value than an odd number. The conductance oscillations are large for alkali-metal chains and their phase is opposite to that of noble-metal chains.