How can i access $ROOTSYS directory?

Hi experts!
I’m a root beginner.
How can i access to directory $ROOTSYS ?
I typed cd $ROOTSYS but there’s no reaction. After i typed pwd, then i located in /home/usr

What should i do?


Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided


First of all you should check if $ROOTSYS is defined. The shell command:

$ echo $ROOTSYS

will tell you.

If it is defined you can use it as is. It will be expended by the shell such as you would have typed the string contained in $ROOTSYS.

for instance;

$ ls $ROOTSYS
$ cd $ROOTSYS
etc ...

Thanks to reply again!


The tutorial tells me to access the library, but I can’t find the library folder in the $ROOTSYS list.
What should i do?

So $ROOTYS is not defined in your case. You should define it. The simplest is to “source” the script file “thisroot.sh” sitting next to the root.exe module. You "cd’ in that folder (where root.exe is) and type:

$ source thisroot.sh

Of course it is recommended to put that command in your .profile file in order to have it executed each time you start a new terminal.

I typed but it shows “bash: thisroot.sh: No such file or directory”.

So lets do it step by step:

  1. Do you know where the executable “root.exe” is ? if not, the command which root.exe will tell you.
  2. once you found the place, you go in that folder using the command cd. In that folder the command ls this* should give you:
% ls this*
thisroot.csh	thisroot.fish	thisroot.sh
  1. then you can do source thisroot.sh and this will define $ROOTSYS

There’s no this* file.

Is there anything wrong when i was downloading the root?

How was root installed your machine ?

I looked at the route manual and followed it. However, there was a lot of trial and error in the download process. So, there are multiple root folders.

You are on Mac ?

No Im on LINUX ubuntu

The ROOT install page is here Installing ROOT - ROOT
I am afraid I cannot help more than what is mentioned in that page.

Thank you for help. :slight_smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.