Looking for bash Answers? Try Ask4KnowledgeBase
Looking for bash Keywords? Try Ask4Keywords

BashManaging PATH environment variable


  • Add path : PATH=$PATH:/new/path
  • Add path : PATH=/new/path:$PATH


PATHPath environment variable


Bash configuration file:

This file is sourced whenever a new interactive Bash shell is started.

In GNU/Linux systems it's generally the ~/.bashrc file; in Mac it's ~/.bash_profile or ~/.profile


The PATH variable must be exported once (It's done by default). Once it is exported it will remain exported and any changes made to it will be applied immediately.

Apply changes:

To apply changes to a Bash configuration file, you must reload that file in a terminal (source /path/to/bash_config_file)