Command is present in my directory, but running it gives error: Command not Found

Hello,
I am working on the linux terminal for a software called FreeSurfer: FS7_linux - Free Surfer Wiki

I have installed it in my project directory and it is installed correctly.

Now there are some commands of this software that I need to run on the terminal, but when I try to run these commands, I get error that Command not found.

I checked that these commands are present in the directory: freesurfer/bin, but when I try to run it: recon-all --version, I get the above error.

On talking with the devs of freesurfer, they told me that this looks like an issue with the environment.

Also, some commands in the bin directory are working, while some give the error: Command not found.

Is there something that I can try to solve it?

Thanks!

I guess the directory is not on PATH. Inspect the output of:

echo $PATH

Try something like:

export PATH=/path/to/freesurfer/bin:$PATH

And then try the commands again.

Hey,
I tried this and am still getting the same errors.