how to add something to path in bash code example Example 1: ubuntu export path $ source ~/.bashrc Example 2: how to add a directory to path in linux nano ~/.bashrc