Start ROOT without having to source thisroot.sh

Hi,

I would like to know if there is a way to avoid sourcing thisroot.sh everytime I want to launch ROOT ? I am pretty new to Linux so the informations on the Install page of ROOT are not very clear to me…

I have the latest ROOT version and I am using Zorin OS which is Ubuntu based.

Thanks for reading me !

Hi @mzriu,

I am assuming that you installed ROOT either building from source or using pre-compiled binaries. If that’s the case, (and citing from Installing ROOT - ROOT),

To avoid having to source thisroot.sh every time one needs to use ROOT, it is typical to add the command to .bashrc, .profile or analogous configuration files. Note, however, that sourcing thisroot.sh might interfere with ROOT versions installed with different methods.

Cheers,
J.

Hi @jalopezg

Thanks for your answer ! What you cited is “not very clear to me” informations I was talking about :sweat_smile:

Can you tell me what I am supposed to write in say my “.bashrc” file ?

Best,
Marius

Hi @mzriu,

Assuming that you use bash as a shell (most likely true), you can add a line at the end of the .bashrc file as follows:

source /path/to/root/install_dir/bin/thisroot.sh

The .bashrc file is located in your home directory. The changes should be effective the next time you run bash, e.g. a new window of your terminal emulator.

Cheers,
J.

Thanks a lot this will save me much time !