To colonize different environments, bacteria precisely tune