Following this post I installed brew and then reinstalled ocaml to include graphics:
/usr/bin/ruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/i
How do I do check the instance of ocaml that is running?
If your question is: what program is running when you type ocaml
in a terminal window at the shell prompt (or more generally thru execvp and other functions)? then you should use the which ocaml
command.
And what does the poster mean by "prepending that url to your PATH environment"?
Read more about the PATH variable. It is often set in your ~/.bashrc file (which you should probably and carefully edit once using your favorite editor) -or some other bash initialization file- if your interactive shell is bash
. You should check what it is with the echo $PATH
command. See also this. Notice that ~/.bashrc
is expanded by your shell during globbing. Read also the documentation of bash
notably the Bash Startup Files chapter.
If you are using opam
you should read its documentation. Notably this question (mentioning PATH
) from its FAQ.
Since aliases are mostly for interactive shells, defining an alias is not enough for most shell scripts. You really need to change your $PATH
and/or add files (or symlinks) in directories mentioned in it.
PS. Understanding the role of PATH
and how to set it is mandatory for serious use of the command line, notably on POSIX systems.