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