Mongoose are primarily found in Africa and their range extends across the whole continent, with some species of mongoose living on the Iberian Peninsula and in southern Asia. Most species of mongoose live in complex subterranean tunnels or borrows. Their habitat ranges from the sands of the Kalahari desert to the marshes of Madagascar. They mostly feed on insects, crabs, earthworms, lizards, birds, and rodents. However, they also eat eggs and carrion.
The meerkat is a small mongoose found in southern Africa. They are highly social, and form packs of two to 30 individuals each that occupy home ranges around 5 km2.They are common in savannahs, open plains and rocky areas beside dry rivers in biomes such as the Fynbos and the Karoo, and live in large burrow systems in plains that protect them in harsh weather and at extreme temperatures.There is a social hierarchy—generally dominant individuals in a pack breed and produce offspring, and the nonbreeding, subordinate members provide care to the pups. Meerkats are active during the day, mostly in the early morning and late afternoon; they remain continually alert and retreat to burrows when sensing danger. The meerkat is primarily an insectivore, feeding heavily on beetles and lepidopterans; it can additionally feed on eggs, amphibians, arthropods (such as scorpions, to whose venom they are immune), reptiles, small birds, plants and seeds.