[SOLVED]How to start a program in Linux without ./ lazarus / 32-Linux ---------------------------------------------------------------------- cdbc · 2021-03-01 08:13 Hi I'm wondering, how come i've got to start my program with ./myapp, when f.ex Git starts without ./ ?!? What's the difference, is there some option/parameter that I can add or adjust?  Regards Benny ---------------------------------------------------------------------- marcov · 2021-03-01 08:28 No place. GIT is in a directory in the $PATH and your binary not. ---------------------------------------------------------------------- balazsszekely · 2021-03-01 09:40 Quote from: cdbc on March 01, 2021, 09:13:02 amHi I'm wondering, how come i've got to start my program with ./myapp, when f.ex Git starts without ./ ?!? What's the difference, is there some option/parameter that I can add or adjust?  Create a deb package for you application. After install, you can start it from a terminal by typing the package name, without "./". ---------------------------------------------------------------------- marcov · 2021-03-01 09:51 Another practical trick: I create a ~/bin that I put in the path (editing .bashrc). Then I create symlinks for projects that I'm working on from the bin directory to the binary I want to run. This means the live version of the binary remains in the project dir (for easy editing/testing/updating), but allows executing without path. ---------------------------------------------------------------------- cdbc · 2021-03-01 12:29 Hi @ getmem: my PCLinuxOS works with rpm's, and I think it's a bit overkill for my apps  @ marcov:   1)  That makes perfectly sense, thank you.   2)  Cool trick, i'll use that.  Thank you very much guys  Regards Benny ---------------------------------------------------------------------- lucamar · 2021-03-01 13:51 Quote from: cdbc on March 01, 2021, 09:13:02 amI'm wondering, how come i've got to start my program with ./myapp, when f.ex Git starts without ./ ?!? What's the difference, is there some option/parameter that I can add or adjust?  Regards Benny The reason is that, unlike e.g. Windows, most *nixen don't look in the current directory for the executable, only in the PATH. If a program is not installed in any of the directories in the PATH you have to tell the system where it is in the invocation. Quote from: marcov on March 01, 2021, 10:51:34 amAnother practical trick: I create a ~/bin that I put in the path (editing .bashrc). Then I create symlinks for projects that I'm working on from the bin directory to the binary I want to run. This means the live version of the binary remains in the project dir (for easy editing/testing/updating), but allows executing without path. I think most of us on Linux do that; it's extremely handy. We run all of our internal tools that way Another "trick" is to link from /usr/bin/ (or any "bin" folder, in fact) though that usually requires being root. It's, for example, how startlazarus is invoked: Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i $ ls -l /usr/bin/startlazaruslrwxrwxrwx 1 root root 38 jul  7  2020 /usr/bin/startlazarus -> /usr/share/lazarus/2.0.10/startlazarusand it's used mostly for multi-user installs. ---------------------------------------------------------------------- avra · 2021-03-02 10:31 Quote from: marcov on March 01, 2021, 10:51:34 amI create a ~/bin that I put in the path (editing .bashrc).+1