Zsh: command not found: freeview

I downloaded FreeSurfer yesterday and managed to set up and run freeview smoothly. However, after I exit Terminal and Freeview and come back later, everytime I try to run a freeview command, this error keeps coming up

zsh: command not found: freeview

Why does this happen and what could I do to solve this?

And when I try to set up freeview again my terminal would crash like this also!

Hi @M_Nguy_n and welcome to neurostars!

If these lines are not in your .zprofile, please add them (making sure the paths are also true to your filesystem):

# FreeSurfer Setup
export FREESURFER_HOME=/Applications/freesurfer/7.4.1
source $FREESURFER_HOME/SetUpFreeSurfer.sh
export FS_LICENSE='/Applications/freesurfer/license.txt'

That way these lines will run every time a terminal is open.