Add linux command without modifying PATH

Often I install stuff that I want to use on the command line that would require modifying the PATH variable. An alternative is to symlink the command wanted to /usr/local/bin (or whatever bin folder already in your path)

Example for gradle (install using apt-get was not working on Ubuntu)

sudo ln -s /opt/apps/gradle/bin/gradle /usr/local/bin/gradle
export GRADLE_HOME=/opt/apps/gradle

The command is then accessible in any script that use the hash bang #!/usr/bin/env

#!/usr/bin/env gradle

Popular posts from this blog

Fixing "DerInputStream.getLength(): lengthTag=109, too big" in Android Studio

Simple Samba setup on Lubuntu

Solving: insufficient permissions for device: user in plugdev group; are your udev rules wrong