---
title: "Bash"
id: "26919"
type: "epkb_post_type_1"
slug: "bash"
published_at: "2024-04-02T15:23:59+00:00"
modified_at: "2024-10-10T13:28:10+00:00"
url: "https://docs.rc.fas.harvard.edu/kb/bash/"
markdown_url: "https://docs.rc.fas.harvard.edu/kb/bash.md"
excerpt: "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..."
taxonomy_epkb_post_type_1_category:
  - "Languages"
taxonomy_epkb_post_type_1_tag:
  - "Bash"
  - "software"
---

# Bash

### 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](https://docs.rc.fas.harvard.edu/kb/editing-your-bashrc/)
 your `.bashrc` for more details.

For more on Bash see the following guides:

- [GNU Bash Page](https://tiswww.case.edu/php/chet/bash/bashtop.html)
- [Pure Bash Bible](https://github.com/dylanaraps/pure-bash-bible)
- [Bash Tutorial](https://www.freecodecamp.org/news/bash-scripting-tutorial-linux-shell-script-and-command-line-for-beginners/)

### Bash Syntax Checking

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

### Examples

[FASRC User Codes](https://github.com/fasrc/User_Codes/tree/master/Languages/BASH)

Bookmarkable Links

- [1. Description](#Description)
- [2. Bash Syntax Checking](#Bash_Syntax_Checking)
- [3. Examples](#Examples)

Last UpdatedOctober 10, 2024

Tags: - [Bash](https://docs.rc.fas.harvard.edu/kb/tag/bash/)
- [software](https://docs.rc.fas.harvard.edu/kb/tag/software/)
