What is Bash?
Note: This is only relevant if you are working on a Mac or Linux system or using a Windows Subsystem for Linux (WSL)
What is bash and why should I use it?
When you open your Terminal on a Mac, what you see is a bash shell. This bash shell is an interface to your operating system. From here, you can input commands to access files or programs on your computer. Doing this will accomplish the same task as double clicking to open a program and then using the graphical user interface (GUI) of the program to interface with it. The main difference is that by using the Mac Terminal, you will interface with programs and files via the command line (CLI) instead of a GUI.
Being able to use bash is essential for most image analysis techniques discussed within this collective of documentation. For example, programs like Freesurfer and FSL become significantly more versatile by interfacing with them via bash. Plus, bash allows you to quickly move, delete, rename, copy, or otherwise reorganize long lists of files very quickly (along with many other convenient perks).
Here is a quick list of common, useful bash commands.
It will be helpful to get familiar with bash quickly by opening the Terminal and trying out some simple commands.
Last updated