Bash will find an executable specified by its bare filename (i.e. without preceding path elements) only if it is on its search path, which is stored in the PATH variable. The current directory is not necessarily on the search path.
To see the current search path, try this:
echo $PATH
To see if a command is on your search path, try this:
which command
If command
is on the search path, the which
command will return the command's location on the file system. - To extend your search path with the directory of your command, try:
PATH=$PATH:directory_to_be_added
Note that directory_to_be_added
should be the full directory name to the executable (not a directory relative to your current directory).
Once the directory of your julia
command has been added to your PATH, which julia
should return julia
's full pathname, and julia
should be executable from anywhere on your filesystem.
Changing the PATH is a general way of ensuring that executables that you use regularly are found by the shell. If you merely wish to run a command that is not on the search path once (i.e. in a one-off attempt), or you wish to override the search path, you can specify your command including pathname elements. So, to run a command that is in the current directory and not on the search path (or not the first command with that name on the search path), you could use ./command
.