Question about execute a file?

Hi, I have a stupid question :))

Why do some files when execute need put “./” before the file, and some other files no need?

what is different between “./” and without “./”?

Many thanks

1 Like


From what I have learned, not saying this concrete, it matters where the file is located. Linux files are specifically located in their destination files/dirs. for a reason.


P.S. So, the executable bit in the file, which is available to all Linux files, needs a specific PATH located in one of its intended directories. This way, it is found and used as such. I can keep researching more ideas if needed…also:

  1. command line - Why do we use "./" (dot slash) to execute a file in Linux/UNIX? - Unix & Linux Stack Exchange
  2. It seems there is a security concern for users…

Sweet, thank you so much!