# Walkthrough: Setting up ROOT (5 minutes)

Before you start using ROOT, you usually have to set it up.

If you’re not using one of the Nevis particle-physics systems, hopefully you have received instructions on how to set up ROOT at your site. Now is the time to follow those directions.

If you are using one of the particle-physics systems at Nevis, type:

> module load root


Nevis specifics

The command module load root1 sets some Unix environment variables and modifies your command and library paths. If you need to remove these changes, use the command module unload root.

One of the variables that’s set is $ROOTSYS. This will be helpful to you if you’re following one of the examples in the ROOT Users Guide. For example, if you’re told to find a file in$ROOTSYS/tutorials (see the References section of this tutorial, for example) you’ll be able to do this only after you’ve typed module load root.

You have to execute module load root once each time you login to Linux and use ROOT. If you wish this command to be automatically executed when you login, you can add it to the .myprofile file in your home directory (but read the warnings below before you do this).

Warning

• It’s a Nevis convention to use ~/.myprofile for your custom shell setup. Other sites may tell you to edit ~/.profile, ~/.bashrc, ~/.bash_profile, ~/.zprofile, ~/.cshrc, ~/tcshrc, etc. There is a Nevis wiki page on shell setup scripts.

• Even at Nevis, some physics groups work with software frameworks that have their own versions of ROOT built-in; e.g., Athena in ATLAS or LArSoft in MicroBooNE. If you’re working with such a framework, you’ll have a special set-up command to use; you must not use the generic Nevis module load root.

• Finally, do not put module load root in a start-up script if you’re using the Nevis notebook server. You’ll get lots of “not found” errors.

The module load UNIX command is part of a package called “environment modules.” Though it’s a standard package, environment modules are not normally included in a default UNIX installation. Here’s a Nevis wiki page on available modules.