Configure Your Shell


Bash has a Bash Profile which is a file that allows you to configure how your terminal behaves and define your own custom functions. Here’s some configurations that set your default text editor and make it easy for you to edit your profile in the future.

  1. run the command touch ~/.bashrc ~/.bash_profile this will make sure the files ~/.bashrc and ~/.bash_profile exist
  2. open the ~/.bash_profile and ~/.bashrc files in your text editor
  3. To ensure .bashrc loads when the profile loads, and set your default editor to VSCode, add the following lines to the end of your ~/.bash_profile
# Read $HOME/.bashrc, if present.
if [ -f $HOME/.bashrc ]; then
  source $HOME/.bashrc

# set the default editor to VSCode
export EDITOR=code

the bash configuration files are loaded by bash at different times - we edit them both to ensure node will always be setup