Linux Install & Setup
CentOS 6, 7 and 8
The examples below show how to install the rpm file, freesurfer-CentOS7-7.2.0.x86_64.rpm or how to unpack the Freesurfer 7.2.0 CentOS 7 tar archive, freesurfer-linux-centos7_x86_64-7.2.0.tar.gz.
If you are using CentOS8, then you would use the freesurfer-CentOS8-7.2.0-1.x86_64.rpm or the freesurfer-linux-centos8_x86_64-7.2.0.tar.gz archive file in the examples below instead of the centOS7 files. Please note the instructions are a bit different for using the RPM in the CentOS8 section compared to the CentOS7 section.
If you are still working with CentOS 6 (which will no longer be supported by RedHat/CentOS projects after November 2020), then you would use the freesurfer-CentOS6-7.2.0-1.x86_64.rpm. or the freesurfer-linux-centos6_x86_64-7.2.0.tar.gz file in the examples below instead of the CentOS7 files.
Ubuntu 18, 20
Similarly for Ubuntu 18, 20, use the freesurfer_7.2.0_amd64.deb installed file or the freesurfer-linux-ubuntu18_amd64-7.2.0.tar.gz archive file.
Installation with the Package Management Utilities on CentOS 6, 7, and 8
Please note you need sudo/root privileges on the system to install software with package management tools like yum and rpm (CentOS/RedHat) or apt and dnf (Ubuntu/Debian) systems. If you do not have sudo/root privileges then proceed to the next section to use the tar archive.
For Redhat/CentOS systems, packages in the form of *.rpm files may contain source, binaries and/or libraries to install on the system. The *.rpm package also usually contains a list of the system libraries and programs the *.rpm package contents will need from the system in order to run after installation. Yum compares the system dependency information in the *.rpm package against what is currently installed on the system. Then it determines what if any other *.rpm packages need to be downloaded and installed in order to satisfy the dependencies for the package(s) you have listed to install on the command. Depending upon what is already installed on your system, yum will figure out what if any system software is missing, and then install it for you. Hence the builtin yum/RPM tools can save you the hassle of trying to figure out what software is missing on your system before you attempt to install and run freesurfer.
Installation with the Tar Archive
On Linux systems, if you do not have root/sudo privileges, you can expand the tar archive file (.tar.gz) under any convenient path/subdirectory on your machine you have permission to write to. For example, you can expand the tar archive under your $HOME directory. Please note that if you use the tar file then you forego checking to see if system packages freesurfer needs to run can be found online and installed on your system.
Example of placing the CentOS7 tar archive under the $HOME directory belonging to user "tester" without using sudo/root privileges. Setup commands follow. Shell is bash or Bourne shell.
$ cd $HOME $ pwd /home/tester $ tar -zxpf freesurfer-linux-centos7_x86_64-7.2.0.tar.gz <wait for command to finish> $ cd freesurfer $ pwd /home/tester/freesurfer $ export FREESURFER_HOME=$HOME/freesurfer $ export SUBJECTS_DIR=$FREESURFER_HOME/subjects $ source $FREESURFER_HOME/SetUpFreeSurfer.sh -------- freesurfer-linux-centos7_x86_64-7.2.0-20210720-aa8f76b -------- Setting up environment for FreeSurfer/FS-FAST (and FSL) FREESURFER_HOME /home/tester/freesurfer FSFAST_HOME /home/tester/freesurfer/fsfast FSF_OUTPUT_FORMAT nii.gz SUBJECTS_DIR /home/tester/freesurfer/subjects MNI_DIR /home/tester/freesurfer/mni $ which freeview /home/tester/freesurfer/bin/freeview