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