i have a shell script in a directory on my hard drive.
it is located in my home directory.
how do i make this script executable anywhere on my hard drive?
i am thinking i would have to add this script to my path, but am not sure how to do this.
Open the terminal and create a file called .bash_profile in your home directory.
Place this line in this file:
Code:
export PATH=$PATH:~
Save the file.
Any new terminal you open will now have your home directory in the path. So when searching for executables with a name you've provided, that will be one directory (the last one, if you add it exactly as above) that is searched.