The local electronic structure of nanoscale chains is investigated theoretically. We propose a mechanism to explain the even-odd oscillation observed in the length distribution of atom chains. We study the spatial peak structure as obtained by scanning-tunneling-microscopy constant-current topography as a function of the electron-electron interaction, band filling, and temperature. The site-dependent magnetic moment is also examined.