At my school's Linux cluster, its possible to run executables without the ./ prefix. However, on my home machines, I have to do this.
I tried adding the code folder to the PATH via
export PATH=/home/jason/Code/:$PATH
This worked when I wanted to have some custom scripts available for autocomplete, but the compiled executables aren't showing up.
How can I set up my home machines to execute without the ./ prefix?
Try this command instead:
This will make it so that the system will look for executables in current directory without a "./". The command that you gave will make it so that the system will always look in that directory no matter what directory that you are in.
For your home machine you can just add a bin folder to your home dir., after a restart it will automatically be added to your path with any the recent ubuntu releases. Then you can call your script just with the scriptname
Usually best to make sure that your scriptnames are unique as by default ~/bin will trump /usr/bin. If in doubt just add a # to the end of name. Ex. - find1
No need to have any .sh in scriptnames, note this also works with executable binaires