Last Updated: February 25, 2016
·
7.055K
· jkirchartz

Add the current directory to $PATH

Setting up our tools can be tricky sometimes. Not every tool will automatically add itself to the $PATH variable. When that happens I use find to locate the file,

sudo find / -name SDK_script.sh

After a moment it will start showing you file locations, from there cd into that directory, and now it's easy to add it to your config like so:

echo "export PATH=$PWD:\$PATH" >> ~/.bashrc

>> file will redirect standard output (or stdout) to a file, and append it's contents if the file exists, or creates it if it doesn't. Also the back-slash (\) is an escape symbol here so it prints "$PATH" instead of the contents of the variable $PATH