Linux Install & Setup
CentOS 7 and 8
The examples below show how to unpack the Freesurfer 7.0.0 CentOS 7 tar archive, freesurfer-linux-centos7_x86_64-7.0.0.tar.gz, or how to install the rpm file, freesurfer-CentOS7-7.0.0-1.x86_64.rpm. The freesurfer CentOS7 RPM installer and archive package can also be used on CentOS8. 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 same commands in the examples below. Use the CentOS6 archive freesurfer-linux-centos6_x86_64-7.0.0.tar.gz or rpm file freesurfer-CentOS6-7.0.0-1.x86_64.rpm. instead of the CentOS7 files.
Use the example below where the CentOS7 tar archive is unpacked - and do the same on your Ubuntu system. We hope to provide an Ubuntu .deb installer in the near future.
Installation with the Tar Archive
On Linux systems, the tar archive file (.tar.gz) can be expanded 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.
To install freesurfer under a recommended shared system location, e.g., /usr/local, you will typically need sudo or root privileges. Please note that if you have sudo/root privileges, then we recommend using the Installation with the Yum Package Manager process listed below. The linux package management tools provide the advantage of trying to install any system software packages freesurfer requires to run.
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 -zxvpf freesurfer-linux-centos7_x86_64-7.0.0.tar.gz x freesurfer/ x freesurfer/WMParcStatsLUT.txt x freesurfer/sessions/ x freesurfer/sessions/README ... .. <rest of output deleted> $ 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.0.0-20200427-5b17a0d -------- 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
Example of placing the CentOS7 tar archive under the system location /usr/local by user "tester" using sudo/root privileges. Setup commands follow. Shell is bash or Bourne shell.
$ cd $HOME $ pwd /home/tester $ sudo tar -C /usr/local -zxvpf freesurfer-linux-centos7_x86_64-7.0.0.tar.gz x freesurfer/ x freesurfer/WMParcStatsLUT.txt x freesurfer/sessions/ x freesurfer/sessions/README ... .. <rest of output deleted> $ export FREESURFER_HOME=/usr/local/freesurfer $ export SUBJECTS_DIR=$FREESURFER_HOME/subjects $ source $FREESURFER_HOME/SetUpFreeSurfer.sh -------- freesurfer-linux-centos7_x86_64-7.0.0-20200427-5b17a0d -------- Setting up environment for FreeSurfer/FS-FAST (and FSL) FREESURFER_HOME /usr/local/freesurfer FSFAST_HOME /usr/local/freesurfer/fsfast FSF_OUTPUT_FORMAT nii.gz SUBJECTS_DIR /usr/local/freesurfer/subjects MNI_DIR /usr/local/freesurfer/mni $ which freeview /usr/local/freesurfer/bin/freeview
Installation with the Yum Package Manager on CentOS 6, 7, and 8
The "yum" package manager command is available on Redhat/CentOS linux and its derivatives to install, manage, and update the system software. Please note that you will need sudo/root privileges on the system to install software with yum.
System 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 if granted permission. 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.