When I started using FSL for DTI tractography, I was told that I needed to get off of the GUI and start using the command line for submitting “jobs” (tractography, segmentation, and other FSL functions). But without a basic understanding of using the command line, it wasn’t realistic to jump into complex FSL commands without knowing the basics of navigating the server. Below is a list of commands that I identified as most useful for myself and other workers in our lab. If you are starting out in the world of tractography, and like me, have little to no experience using the command line, you may find the commands below especially useful for getting started.
First, you’ll need to open your computer’s terminal program (in Mac, you can use X11 or Terminal) and then log in to the server you’ll be using. Your server administrator will set you up with a special command and login to access your server. For tractography, it is most likely you will be running commands through a server, and not your local computer, since tractography is very computationally expensive.
Basic Terminal Commands
pwd print working directory (tells you where you are)
ls list files
ls –l list files in column format with date created/modified
cd foldername change directory to foldername (go into folder)
cd .. move up one directory
mkdir foldername make directory/create a new directory or folder with your specified name
cat see what’s in a file (useful for waytotal files; “cat waytotal”)
mv filename1 filename 2 change the name of a file (from filename1 to filename2)
& use after commands to keep X11/terminal window active
qmon open Grid Engine (program that tracks progress of fsl runs on your server)
FSL Commands in the Terminal
fsl open fsl
fslview filename open file in fslview
fslmaths used to open multiple commands in fsl; to be covered in upcoming tutorials
I am trying to use FSL from VMware. But i tried typing fsl in the terminal, it says command not found