is there somewhere a complete list of commands that needs a explicit path?
short answer : there is no such list.
long answer :
in most interactive shell, commands are search using $PATH
variable. PATH
is a list of colon separated directories to look for executable.
a sample PATH
looks like
/home/archemar/bin:/usr/local/bin:/usr/sbin:/usr/bin
(actual PATH
are much longer)
when you issue command foo
,
- shell will search from left to right for an executable file named
foo
in directories listed in PATH
, silently ignoring non exitent dir.
- if an executable
foo
is found, the shell will run it.
- if none is found, you'll get
foo: command not found
error.
If you use relative (game1/foo
, ./foo
) or absolute filename (/opt/tomcat/bin/start.sh
), shell will look for that file and execute it (or complain if not found).
If you want shell to find executable in current directory, just add .
(local dir) in PATH
, for instance
.:/home/archemar/bin:/usr/local/bin:/usr/sbin:/usr/bin
Note that adding .
in PATH
is considered as a bad practice for security reasons.