Crabs live on rocky shorelines in tidal pools and in salt marshes and mud flats.