FreeSurfer recon-all command not found

Hi everyone,

It is my first time trying to use FreeSurfer for fMRI data anatomical preprocessing. Although I installed FreeSurfer on my computer, I’ve been getting the error saying “command not found” when I try to use recon-all in the terminal.

I would appreciate any help, thanks a lot in advance.

Hi @elifoymagil,

When you install FreeSurfer, it usually automatically updates your .bash_profile or equivalent file (I believe most recent Macs use .zprofile) to add FreeSurfer to your environment’s path. Can you open that file to see if any modifications have been made?

In particular, something like this:

# Set up Freesurfer environment
export FREESURFER_HOME=/Applications/freesurfer/
source $FREESURFER_HOME/SetUpFreeSurfer.sh
export FS_LICENSE='/Applications/freesurfer/license.txt'

Best,
Steven

Thank you for your reply @Steven. In my .zprofile, there is no information related to FreeSurfer. Only the FSL path is written which is my external SSD:

# FSL Setup
FSLDIR=/Volumes/ElifSanDisk/fsl
PATH=${FSLDIR}/share/fsl/bin:${PATH}
export FSLDIR PATH
. ${FSLDIR}/etc/fslconf/fsl.sh

Should I set up Freesurfer environment in the .zprofile?

Sure, give it a shot!

Unfortunately, it didn’t work. Still, thanks a lot for your help.

Is Freesurfer installed in your /Applications folder? What happens if you run those three lines of code in your terminal?