It occurs in all habitats except those that are in dense shade. It grows as an annual in patches of red sand in Central Australia, responding rapidly to bouts of rainfall to complete its life cycle. It is common among granite outcrops in southwest Western Australia, and is found on heavier and more fertile soils in the Sydney region, such as basalt-, shale- or limestone-based soils, generally in areas with a high water table. It has been reported growing in disturbed soil, along roadsides and in fields in the New England region in the United States.