# Change path using setenv

**URL:** <https://root-forum.cern.ch/t/change-path-using-setenv/49750>\
**Category:** Newbie\
**Created:** [April 26, 2022, 2:52pm UTC](https://root-forum.cern.ch/t/change-path-using-setenv/49750 "2022-04-26T14:52:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Samer\_hisham](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/samer_hisham/32/28875_2.png) [@Samer\_hisham](https://root-forum.cern.ch/u/Samer_hisham)\
**Post date:** [April 26, 2022, 2:52pm UTC](https://root-forum.cern.ch/t/change-path-using-setenv/49750/1 "2022-04-26T14:52:37Z")

</div>

Hello, i am using root but i have installed older version and want to add it to my path

```auto
export ROOTSYS=/Users/eyad/samer/programs/root
export PATH=$ROOTSYS/bin:$PATH
export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=$ROOTSYS/lib:$DYLD_LIBRARY_PATH

```

i am using export but i want to make it through setenv.  
the syntax should be setenv instead of export what is the right syntax ?

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [April 26, 2022, 4:19pm UTC](https://root-forum.cern.ch/t/change-path-using-setenv/49750/2 "2022-04-26T16:19:08Z")

</div>

There is many examples on the web. For instance [this](https://www.computerhope.com/unix/usetenv.htm).
