You'll need to add that scripts directory to your PATH
variable. This can become tedious if you download a lot of self-contained executables. My recommendation would be to create a bin
folder in your home folder and place all your self-contained executable files in there.
Most recent versions of Ubuntu already have their PATH
setup to read from $HOME/bin
so it'll work after a restart of the terminal or after you type source ~/.profile
. Once that's completed you should be able to just enter sage
in to the terminal.
If you wanted to add another directory, other than ~/bin
, you can open the .profile
file in your home directory and add the following line to the bottom:
PATH="/path/to/folder:$PATH"
Replacing /path/to/folder
with the absolute path to the directory you wish to add. That will prepend the directory of your choice to your PATH
environment and it'll take effect once you enter source ~/.profile
(or restart the terminal).