Skip to main content

Executing Binary/Script

If binary is relative to your current directory

If the binary/script is relative to your current directory, then you would have to use ./ (dot slash) to execute the binary or script with respect to your current path.

This is because your current directory isn't in your PATH environment variable.

If binary is somewhere else

However, if the binary or script is in another path, then you can execute it by providing the full path without the dot slash, because then it wouldn't make sense, dot slash is used for relative path, if you provide full path and dot slash, then it is saying the binary is in your current directory, so it doesn't make sense.

/usr/bin/node would execute the node binary, you would not do ./usr/bin/node.