.bashrc#

The .bashrc file is a script executed whenever a new terminal session starts in an interactive, non-login shell. It’s used to configure the environment, define aliases, set environment variables, and customize the command prompt. This is important, especially when working on data analysis to ensure reproducibility. Even more so when working in CANNON, as certain configurations must be made to allow you to use common tools like Python, Git, and VS Code.

Setting up a .bashrc file in CANNON:#

  1. Log into CANNON and open Terminal

  2. Navigate to your home directory. There should already by a .bashrc file in this directory.

  3. Open and edit it with at least the following configurations to allow you to use Python, Git, and VS Code.

   # .bashrc

   # Source global definitions
   if [ -f /etc/bashrc ]; then
       . /etc/bashrc
   fi

   function mm() {
       module load vscode 
       module load git
       module load python
   } 
  1. Load the the modules configured in the .bashrc by running your function in Terminal (e.g., mm)