# How to calculate likelihood of linear regression [duplicate]

This is a pretty basic question, but one I am having a hard time finding an answer to. How do you calculate the likelihood of a simple linear model? Like, say, $$y=\beta_0+\beta_1x+e$$ I am working on model selection via AIC and would like to have a better sense of how it works.

edit: So I think I figured it out. When calculating the likelihood of a linear regression you are actually calculating the likelihood of the residuals. In the case that the residuals have a normal distribution the least-squares and maximum-likelihood parameter estimates are mathematically equivalent, but if you have a different distribution of residuals this will not be the case. Is this correct?