0

How can i save a ./ executable as a terminal command? Like, so I don't longer have to type ./ in order to run the executable.

Psionikal
  • 274

1 Answers1

1

I am assuming that the application you would like to start is located at /some/path and you are trying to start a program called executable, please change accordingly

  1. add /some/path to your $PATH variable.

    • You can do this temporarily by typing export PATH=$PATH:/some/path
    • To do this permanently, but only for the current user add the above command to the end of ~/.profile
    • To achieve this globally open the /etc/environment file and make the end of the PATH=" line read :/some/path"
  2. link your executable to a path that is already on the PATH variable (echo $PATH) e.g. ln -s /some/path/executable ~/bin
mbeyss
  • 978