How to permanently set $PATH on Linux? Prepending a dot to the PATH - urrent directory first | export PATH=".:$PATH"
You need to add it to your
~/.profile
file.export PATH=$PATH:/path/to/dir
Depending on what you're doing, you also may want to symlink to binaries:
cd /usr/bin
sudo ln -s /path/to/binary binary-name
Prepending a dot to the PATH means the program will be looked for in the current
directory first, before searching the rest of the path. This is very useful during the
code development for example. Do this by running:
export PATH=".:$PATH"
Comments
Post a Comment