# \[Solved\] Setup environment variables on lxplus?

**URL:** <https://root-forum.cern.ch/t/solved-setup-environment-variables-on-lxplus/36533>\
**Category:** Newbie\
**Created:** [October 27, 2019, 8:17am UTC](https://root-forum.cern.ch/t/solved-setup-environment-variables-on-lxplus/36533 "2019-10-27T08:17:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![eneb](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/e/87869e/32.png) [@eneb](https://root-forum.cern.ch/u/eneb)\
**Post date:** [October 27, 2019, 8:17am UTC](https://root-forum.cern.ch/t/solved-setup-environment-variables-on-lxplus/36533/1 "2019-10-27T08:17:19Z")

</div>

Hi,

I have installed ROOT locally on my laptop and wrote the environment variables in my .bashrc and everything works fine. Now I have to work on lxplus (not lxplus6!) with ROOT. Do I have to set environment variables in the .bashrc in /afs/cern.ch/user/path/to/user/, too?

Currently I’m logged in with ssh -X username@lxplus.cern.ch and then I did setupATLAS and lsetup root with the current version. And I can start ROOT just fine. So is there any need of setting up something in the .bashrc?

Thanks for your help.

---

<div class="post-metadata">

**Author:** ![etejedor](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/e/e79b87/32.png) [@etejedor](https://root-forum.cern.ch/u/etejedor)\
**Post date:** [October 28, 2019, 9:24am UTC](https://root-forum.cern.ch/t/solved-setup-environment-variables-on-lxplus/36533/2 "2019-10-28T09:24:35Z")

</div>

Hi,  
You can include those commands you run in the .bashrc if you want them to be executed every time you log into lxplus. I guess you followed some recipe from ATLAS to set your environment from lxplus? It should be enough then.

---

<div class="post-metadata">

**Author:** ![eneb](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/e/87869e/32.png) [@eneb](https://root-forum.cern.ch/u/eneb)\
**Post date:** [October 28, 2019, 12:50pm UTC](https://root-forum.cern.ch/t/solved-setup-environment-variables-on-lxplus/36533/3 "2019-10-28T12:50:08Z")

</div>

Hi,

thanks for your reply. I didn’t follow any recipe to set up my environment, because it works just fine I think. That was basically my question, if I have to do something (else). But don’t seems to be the case.

---

<div class="post-metadata">

**Author:** ![yus](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/y/9fc348/32.png) [@yus](https://root-forum.cern.ch/u/yus)\
**Post date:** [October 28, 2019, 2:46pm UTC](https://root-forum.cern.ch/t/solved-setup-environment-variables-on-lxplus/36533/4 "2019-10-28T14:46:30Z")

</div>

Hi,  
yes, doing something like

```auto
setupATLAS
lsetup "root 6.18.00-x86_64-centos7-gcc8-opt"

```

is enough, but if you don’t want to type this long parameter of `lsetup` every time, you can put the following into your `.bashrc` (or better in your `.bashenv`):

```auto
export ALRB_rootVersion=6.18.00-x86_64-centos7-gcc8-opt

```

Then all you have to do after every login is

```auto
setupATLAS
lsetup root

```

---

<div class="post-metadata">

**Author:** ![eneb](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/e/87869e/32.png) [@eneb](https://root-forum.cern.ch/u/eneb)\
**Post date:** [October 28, 2019, 3:05pm UTC](https://root-forum.cern.ch/t/solved-setup-environment-variables-on-lxplus/36533/5 "2019-10-28T15:05:36Z")

</div>

Hi,

thanks this is really helpful. I will do this.
