MATLAB
sudo nano /etc/profile
export MATLAB=/usr/local/MATLAB/R2018a
export PATH=MATLAB/bin
Freesurfer
sudo nano /etc/profile
export FREESURFER_HOME=/usr/local/freesurfer/7.2.0
export PATH=FREESURFER_HOME/bin
export FSFAST_HOME=/usr/local/freesurfer/7.2.0/fsfast
export PATH=FSFAST_HOME/bin
export SUBJECTS_DIR=/usr/local/freesurfer/7.2.0/subjects
export MNI_DIR=/usr/local/freesurfer/7.2.0/mni
export PATH=MNI_DIR/bin
source $FREESURFER_HOME/SetUpFreeSurfer.sh
FSL
sudo python3 fslinstaller.py
sudo nano /etc/profile
export FSLDIR=/usr/local/fsl
export PATH=FSLDIR/bin
TrackVis
sudo apt-get install libjpeg62
sudo apt install build-essential zlib1g-dev
mkdir src
cd src
wget https://ppa.launchpadcontent.net/linuxuprising/libpng12/ubuntu/pool/main/libp/libpng/libpng_1.2.54.orig.tar.xz
tar Jxfv libpng_1.2.54.orig.tar.xz
cd libpng-1.2.54
sudo ./configure
sudo make
sudo make install
sudo ln -s /usr/local/lib/libpng12.so.0.54.0 /usr/lib/libpng12.so
sudo ln -s /usr/local/lib/libpng12.so.0.54.0 /usr/lib/libpng12.so.0
wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.0.0_1.0.2g-1ubuntu4.20_amd64.deb
sudo dpkg -i libssl1.0.0_1.0.2g-1ubuntu4.20_amd64.deb
sudo nano /etc/profile
export TRACKVIS=/home/bohan/trackvis
export PATH=TRACKVIS
export FSLDIR=/usr/local/fsl
export PATH=FSLDIR/bin
export FREESURFER_HOME=/usr/local/freesurfer/7.2.0
export PATH=FREESURFER_HOME/bin
export FSFAST_HOME=/usr/local/freesurfer/7.2.0/fsfast
export PATH=FSFAST_HOME/bin
export SUBJECTS_DIR=/usr/local/freesurfer/7.2.0/subjects
export MNI_DIR=/usr/local/freesurfer/7.2.0/mni
export PATH=MNI_DIR/bin
export MATLAB=/usr/local/MATLAB/R2018a
export PATH=MATLAB/bin
export TRACKVIS=/home/llj/bin/TrackVis061
export PATH=TRACKVIS
source $FREESURFER_HOME/SetUpFreeSurfer.sh