Shells and shell competition Underwater photo of a hermit crab and gastropod shell Hermit crabs fighting over a shell As hermit crabs grow they require larger shells. Since suitable intact gastropod shells are sometimes a limited resource, there is often vigorous competition among hermit crabs for shells. The availability of empty shells at any given place depends on the relative abundance of gastropods and hermit crabs, matched for size. An equally important issue is the population of organisms that prey upon gastropods and leave the shells intact.
7] Hermit crabs that are kept together may fight or kill a competitor to gain access to the shell they favor. However, if the crabs vary significantly in size, the occurrence of fights over empty shells will decrease or remain non-existent.  A hermit crab with a shell that is too small cannot grow as fast as those with well-fitting shells, and is more likely to be eaten if it cannot retract completely into the shell.  For some larger marine species, supporting one or more sea anemones on the shell can scare away predators.
The sea anemone benefits because it is in position to consume fragments of the hermit crab’s meals.  Development and reproduction Hermit crab species range in size, shape, from species with a carapace only a few millimetres long to Coenobita brevimanus which can approach the size of a coconut. The shell-less hermit crab Birgus latro is the world’s largest terrestrial invertebrate.
 The young develop in stages, with the first two (the nauplius and protozoea) occurring inside the egg.Most hermit crab larvae hatch at the third stage, the zoea. This is a larval stage wherein the crab has several long spines, a long narrow abdomen, and large fringed antennae.
After several zoeal moults, this is followed by the final larval stage, the megalopa stage.   Classification Hermit crabs are more closely related to squat lobsters and porcelain crabs than they are to true crabs. The king crabs in the family Lithodidae were formerly considered to be derived hermit crabs, but are now placed in a separate superfamily.
11] Six families are recognised in the superfamily Paguroidea, containing around 1100 species in total in 120 genera.  * Coenobitidae Dana, 1851 – 2 genera: terrestrial hermit crabs and the coconut crab * Diogenidae Ortmann, 1892 – 20 genera of “left-handed hermit crabs” * Paguridae Latreille, 1802 – 76 genera * Parapaguridae Smith, 1882 – 10 genera * Pylochelidae Bate, 1888 – 10 genera of “symmetrical hermit crabs” * Pylojacquesidae McLaughlin & Lemaitre, 2001 – 2 genera edit] Fossil record The fossil record of in situ hermit crabs using gastropod shells stretches back to the Late Cretaceous. Before that time, at least some hermit crabs used ammonites’ shells instead, as shown by a specimen of Palaeopagurus vandenengeli from the Speeton Clay, Yorkshire, UK from the Lower Cretaceous.
  As pets Photo of four hermit crabs. Four hermit crabs in an aquarium Several marine species of hermit crabs are common in the marine aquarium trade.Of the approximately 15 terrestrial species in the world, the following are commonly kept as pets: Caribbean hermit crab (Coenobita clypeatus), Australian land hermit crab (Coenobita variabilis), and the Ecuadorian hermit crab (Coenobita compressus). Other species such as Coenobita brevimanus, Coenobita rugosus, Coenobita perlatus or Coenobita cavipes are less common but growing in availability and popularity as pets.
These omnivorous or herbivorous species can be useful in the household aquarium as scavengers, because they eat algae and debris.Hermit crabs were once seen as a “throwaway pet” that would live only a few months, but species such as Coenobita clypeatus have a 23 year lifespan if properly treated, and some have lived longer than 32 years.  In general, and despite their moniker, hermit crabs are social animals that do best in groups.  In the wild they can be found in colonies of a hundred or more.
Therefore, many sellers encourage the purchase of more than one crab.  They also require a temperature and humidity-controlled environment, and adequate substrate that is deep enough to allow them to completely bury themselves while moulting.