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

Simple Samba setup on Lubuntu

Soving AccessDenied on Google Cloud Storage domain mapping

Deploying a static website efficiently on Google Cloud Storage