1. Create (if necessary) and go to a clean directory
2. Determine the version of ROOT that you want to download (see, for example, https://root.cern.ch/downloading-root).
3. For example, as I write this, the "production" version is 6.16.00
4. Download this by a command of the form:
In my case, I therefore executed:
Extract the source tree:
tar -zxf root_v6.16.00.source.tar.gz
Make a subdirectory that will eventually serve as the root of the ROOT hierarchy. [Yes, "ROOT" is an unnecessarily confusing name for this software.] Assuming I call this directory ROOTroot, then:
Do other stuff for a couple of hours or so, because buliding ROOT takes a long time. When the build has completed, a complete hierarchy based at ROOTroot should have been built. On my system, that hierarchy runs to about 3.1 GB.
Prepare your shell for executing ROOT
Now you should be able to execute ROOT simply by typing:
Move the ROOT tree if necessary
The entire hierarchy based at ROOTroot may be copied or moved somewhere more convenient if you decide that you've built ROOT somewhere other than where you want it to reside. For example, suppose we want ROOT to be in ~/ROOT, then we execute:
cp -r . ~/ROOT
to copy the entire ~3GB hierarchy. Then, to use ROOT, we dot-execute the script thisroot.sh in the bin directory under the new root(!) of the hierarchy. So, for example:
After this, ROOT may be started simply executing:
Access ROOT easily from subsequent sessions
In order to make ROOT easily available simply by typing
in subsequent sessions, you may want to add the command:
to your ~/.bashrc file, or its equivalent for your bash-like shell.