If you just type the program name (e.g. "clang") without
a full or relative path, then the shell will search for the program (executable file) in the directories listed in the PATH
environment variable. Type
to print out those directories.
You can add another directory, e.g. your Clang install directory, to PATH
Be sure to add the path to the "bin" sub-directory inside the Clang directory!
You may want to add the above command to your ".bashrc" file, so that you don't have to do it again for every new shell.
| I have clang 14.0 installed but I have not found a clang 16.0 installer for linux.|
In Linux, you don't usually have an "installer". Most of the time, you will just install applications via your distribution's package manager. In Ubuntu, this would be
. If the desired application is not
available via the package manager (or the available version is too old), in the default
package repository, then you still may add a third-party repository. Have a look here: https://apt.llvm.org/
To install a specific version of LLVM:
chmod +x llvm.sh
sudo ./llvm.sh <version number>