# Is the $1s^22s^22p^6$ atomic configuration lower in energy than the $1s^22s^22p^5$ atomic configuration?

I read that atoms in the first few rows of the periodic table gain or lose electrons to have 8 valence electrons so that they are energetically stable and has minimum energy.

This means that an atom wtih $$1s^22s^22p^5$$ atomic configuration will gain 1 electron to become $$1s^22s^22p^6$$. But is the latter configuration lower in energy? If it is not, why is it more stable?

• $$1s^22s^22p^5$$, which belongs to the element F, and
• $$1s^22s^22p^6$$, which belongs to Ne,