Sizes of galaxies are an important diagnostic for galaxy formation models . In this study I use the abundance matching ansatz , which has proven to be successful in reproducing galaxy clustering and other statistics , to derive estimates of the virial radius , R _ { 200 } , for galaxies of different morphological types and wide range of stellar mass . I show that over eight of orders of magnitude in stellar mass galaxies of all morphological types follow an approximately linear relation between half-mass radius of their stellar distribution , r _ { 1 / 2 } and virial radius , \mbox { $r _ { 1 / 2 } $ } \approx 0.015 \mbox { $R _ { 200 } $ } with a scatter of \approx 0.2 dex . Such scaling is in remarkable agreement with expectation of models which assume that galaxy sizes are controlled by halo angular momentum , which implies \mbox { $r _ { 1 / 2 } $ } \propto \lambda \mbox { $R _ { 200 } $ } , where \lambda is the spin of galaxy parent halo . The scatter about the relation is comparable with the scatter expected from the distribution of \lambda and normalization of the relation agrees with that predicted by the model of Mo , Mao & White ( 1998 ) , if galaxy sizes were set on average at z \sim 1 - 2 . Moreover , I show that when stellar and gas surface density profiles of galaxies of different morphological types are rescaled using radius r _ { n } = 0.015 \mbox { $R _ { 200 } $ } , the rescaled surface density profiles follow approximately universal exponential ( for late types ) and de Vaucouleurs ( for early types ) profiles with scatter of only \approx 30 - 50 \% at R \approx 1 - 3 r _ { n } . Remarkably , both late and early type galaxies have similar mean stellar surface density profiles at R \gtrsim 1 r _ { n } . The main difference between their stellar distributions is thus at R < r _ { n } . The results of this study imply that galaxy sizes and radial distribution of baryons are shaped primarily by properties of their parent halo and that sizes of both late type disks and early type spheroids are controlled by halo angular momentum .