A systematic shell-model study is performed to study the spectroscopic properties from light to heavy nuclei, such as binding energies, energy levels, electromagnetic properties, and β decays. The importance of cross-shell excitation is shown in the spectroscopic properties of neutron-rich boron, carbon, nitrogen, and oxygen isotopes. A special case is presented for low-lying structure of 14C. The weakly bound effect of proton 1s1/2 orbit is necessary for the description of the mirror energy difference in the nuclei around A=20. Some possible isomers are predicted in the nuclei in the southeast region of 132Sn based on a newly suggested Hamiltonian. A preliminary study on the nuclei around 208Pb are given to show the ability of the shell model in the heavy nuclei.