I want to run my scripts from anywhere on my Linode, is it possible?
Linode
Linode Staff
I would like to run scripts without having to cd to the directory every time.
1 Reply
To run a script from anywhere on your Linode you'll first need to find out where your machine is storing it's executable files. You can do this by running:
$ echo $PATH
Once you know the path(e.g. /usr/local/bin) you will then need to move the file into the directory and make sure it has the correct permissions-- like so:
$ chmod 700 example-script.sh && mv /usr/local/bin
Now that the script is in the $PATH you can run the command without ./:
$ example-script.sh