By using a phenomenologically successful Woods-Saxon potential, I study the shape and shell structure of (A) neutron drip line nuclei with 10≤N≤60, (B) neutron-rich nuclei related to the rprocess with 40≤N≤90, and (C) one-particle spectra in the potential provided by the nucleus 70 Fe as a representative of so-called N=40 "island of inversion (IoI)" nuclei. First, the shell structure that is unique in very weakly-bound neutrons is systematically studied, and the approximate neutron number of odd-N nuclei at which spherical (or deformed) halos can be found is pinned down. Second, the difference of the shell structure in r-process nuclei from that in stable nuclei is examined. Third, the similarity and the difference between the shell structure of N=20 IoI nuclei and that of N=40 IoI nuclei are analyzed. As a result of it, it is concluded that in Fe and Cr isotopes the deformation called "N=40 IoI" continuing up to N=50 is unlikely. PACS numbers: