Studying the dark universe with galaxies