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.
Asked
Active
Viewed 203 times
0
Psionikal
- 274
- 4
- 16
-
1Make an alias that runs `./command` ? – Soren A Mar 02 '18 at 14:49
-
@SorenA Yup, that's what I mean. – Psionikal Mar 02 '18 at 14:50
-
Why type in the same command over and over again when you can do a [history search](https://askubuntu.com/questions/74631/how-do-i-search-my-command-line-history-for-commands-i-used-before)? – Ruud Helderman Mar 02 '18 at 15:18
1 Answers
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
add
/some/pathto your$PATHvariable.- 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/environmentfile and make the end of thePATH="line read:/some/path"
- You can do this temporarily by typing
- link your executable to a path that is already on the
PATHvariable (echo $PATH) e.g.ln -s /some/path/executable ~/bin
mbeyss
- 968
- 8
- 22