They may also bury themselves to evade predators. They prefer muddy to sandy ocean bottoms near eelgrass beds. Rock crabs, however, thrive in rocky areas. Crabs inhabit areas with a moderate current and where edges of banks provide protection. They prey on a large variety of animals including clams, fish, other crabs, sea stars, worms, squid, snails, and eggs from fish or crabs.
Female crabs expend their energy on egg production, and therefore grow more slowly than male crabs.
Because of this, female crabs rarely reach the legal size limit for harvesting. Size restrictions of 165 mm for Dungeness crabs are in place in an effort to ensure that male crabs have a chance to breed at least one time prior to reaching legal size. Female and undersized crabs must be returned to the water immediately upon capture. Area and time closures coincide with soft-shelled periods. Crabs are commercially and recreationally harvested using traps or ring nets set in the water for a period of one to ten days.