...
For further instructions on compiling freesurfer, visit the build guide.
After installing the packages:
Log on as user (not root)
Create a "git" folder (for organization)
cd into that folder
Run
git clone https://github.com/freesurfer/freesurfer.git
This will create a subfolder "freesurfer"
cd into freesurfer