Bash – FASRC DOCS https://docs.rc.fas.harvard.edu Thu, 10 Oct 2024 13:28:10 +0000 en-US hourly 1 https://wordpress.org/?v=6.7.1 https://docs.rc.fas.harvard.edu/wp-content/uploads/2018/08/fasrc_64x64.png Bash – FASRC DOCS https://docs.rc.fas.harvard.edu 32 32 172380571 Bash https://docs.rc.fas.harvard.edu/kb/bash/ Tue, 02 Apr 2024 15:23:59 +0000 https://docs.rc.fas.harvard.edu/?post_type=epkb_post_type_1&p=26919 Description

GNU Bash or simply Bash is a Unix shell and command language written by Brian Fox for the GNU Project as a free software replacement for the Bourne shell. First released in 1989, it has been used widely as the default login shell for most Linux distributions and Apple’s macOS Mojave and earlier versions. Bash is the default environment and scripting language for the cluster.

Bash keeps two hidden files in your home directory which are executed when you log in.  The first is your .bash_profile which is executed when you initially ssh onto the cluster. The second is your .bashrc which is executed each time you start a shell.  Updating these files is how you customize your environment on the cluster. In general you want to keep these clean and as close to the defaults as possible, as the more you put in there the more your login will slow down. See our guide for editing your .bashrc for more details.

For more on Bash see the following guides:

Bash Syntax Checking

You can check the syntax of a bash script (including slurm submission scripts) doing bash -n <myscript>.

Examples

FASRC User Codes

]]>
26919