The peanut is so called only because the nut somewhat resembles a pea in size.
In the early days of American colonization it was known as the ground-nut or ground-pea, because it developed under the surface of the ground, and those names still occur, especially in England.
Another name is earth-nut.
Discovered first in South America by Spaniards, it was introduced by them into equatorial Africa, from whence Negro slaves brought the name nguba with them to the plantations of the Southern United States, where it speedily became goober.
The English, slow to accept the shelled and roasted nuts for human consumption, long knew peanuts as monkey-nuts, because the simians in the zoo avidly consumed all that were tossed to them.