See also Setting up and running FreeSurfer from CSPM and Display Problems.
Create a nifti file from FreeSurfer format
In Linux, open a terminal window, go to the directory where the file is stored, and use mri_convert; this will create a copy of the file in the new format (format is determined by extension).
Example - creating a nifti brain mask file for subject CCHS2002:
[...]$ cd /mnt/hgfs/LinuxShare/subjects/CCHS2002/mri
[...]$ mri_convert brainmask.mgz brainmask.nii