« first day (3430 days earlier)      last day (1818 days later) » 

13:53
@JohnnyApplesauce To run a script (a script, an executable, whatever) from anywhere, the script needs to be executable (chmod +x script.sh) and it needs to be in one of the directories in the environment variable $PATH which is set in your shell's initialization files (usually ~/.profile). See here for how to add directories to your $PATH:
977
Q: How to correctly add a path to PATH?

PaoloI'm wondering where a new path has to be added to the PATH environment variable. I know this can be accomplished by editing .bashrc (for example), but it's not clear how to do this. This way: export PATH=~/opt/bin:$PATH or this? export PATH=$PATH:~/opt/bin

14:42
@terdon I usually do PATH=$PATH+$path or sometimes PATH+=$path. Isn't that an easier way to add path to PATH? ...... :-)
@terdon Or, if we need to do it by hand:
PATH
+ path
----------
PATH

« first day (3430 days earlier)      last day (1818 days later) »