In natural environments, bacteria rarely live as free-swimming cells but are attached to surfaces as biofilms in medical devices, mobile phones or human tissue. The bacterial behavior, how they attach and grow, group together or excrete compounds that glue the biofilm, is influenced by their mechanical interaction with the surface.