The burrowing habit, apart from the necessity to build themselves a shelter, comes from their dietary preferences which consist of insects, scorpions, and centipedes, which are mostly dug up from the ground. Therefore, the meerkats' habitat and diet are significantly linked with each other.
The natural habitat of meerkats comprises burrows, that they dig themselves, in the ground lined with grass. They are native to the Kalahari Desert covered areas of South Africa and Botswana. Meerkats often share their burrows with ground squirrels and yellow mongooses. Sometimes, they also share burrows with snakes, which often results in tragedies.
Their peculiar underground tunnel system consists of several deep and long burrows interconnecting with each other to form a labyrinthine network of underground pathways.
There are usually several entrances to this underground habitat and meerkats are fiercely protective of their territory, often fighting till death to protect it. Different groups of meerkats mark their territories with scent.
Being extremely social animals, they can be often seen grooming each other within the group and babysitting each other's pups while the parents are away. Females who have not had a litter before are often seen playing with and lactating pups of other females.
Meerkats exhibit a strong socially-altruistic behavior insomuch as they take turns acting sentry to alert the group of approaching predators or other dangers.
Meerkats are immune to the venom of the scorpions, and these arachnids are included in their diet. Besides scorpions, they also feed on other desert life forms such as lizards, small snakes, spiders, centipedes, millipedes, smaller mammals, eggs, small birds, plants, etc. However, they are primarily insectivores.
Despite its portrayal and subsequent popularity on television, having meerkats as pets is a bad idea, as these are wild animals that do not bond well with humans. Keeping one as a pet may result in nasty bites, damaged furniture, chewed wiring, and torn drapery - in short, an utter mess where a home used to be.
These are nervous and high-strung animals, and they literally go crazy when kept in solitary confinement. Even keeping a pair doesn't suffice, as they are most comfortable in a group of a couple of dozen. The name meerkat has been borrowed from the Afrikaans word for marsh cat.