It is found in shallow water, usually at depths of less than 4 meters on rocky surfaces, on the outer slopes of reefs and in water channels, where it hides in crevices during the daytime and emerges at night.