# How can one use the executables stored in the /bin directory of root installation folder?

**URL:** <https://root-forum.cern.ch/t/how-can-one-use-the-executables-stored-in-the-bin-directory-of-root-installation-folder/50440>\
**Category:** Newbie\
**Tags:** root\
**Created:** [June 16, 2022, 6:01pm UTC](https://root-forum.cern.ch/t/how-can-one-use-the-executables-stored-in-the-bin-directory-of-root-installation-folder/50440 "2022-06-16T18:01:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rico](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/r/7c8e57/32.png) [@Rico](https://root-forum.cern.ch/u/Rico)\
**Post date:** [June 16, 2022, 6:01pm UTC](https://root-forum.cern.ch/t/how-can-one-use-the-executables-stored-in-the-bin-directory-of-root-installation-folder/50440/1 "2022-06-16T18:01:42Z")

</div>

Hi everybody,  
I was trying to use the “hadd” executable to merge multiple root files in the root interface, i.e I’ve typed the following two commands on terminal:

> > root  
> > hadd MergedOutput.root output{0…3}.root

However it gives an error message since it can’t recognized the identifier “hadd”.  
I tried to execute the following command from inside the /bin directory placed in my root installation folder and it works (the files are correctly merged):

> > hadd /home/rico/Geant4/rico\_folder/sim/build/MergedOutput.root /home/rico/Geant4/rico\_folder/sim/build/output{0…3}.root

I wonder if there is a simple way to tell root to look for the executables stored in the /bin directory when typing commands from inside the root cling interface, so that the first command that I tried can work well.  
Thanks in advance.

\_ROOT Version: 6.26/00  
\_Platform: Ubuntu 18.04

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [June 16, 2022, 6:47pm UTC](https://root-forum.cern.ch/t/how-can-one-use-the-executables-stored-in-the-bin-directory-of-root-installation-folder/50440/2 "2022-06-16T18:47:03Z")

</div>

From the “root” prompt, you can run any executable using its “`.!`” meta command, e.g.: `.! hadd MergedOutput.root output{0…3}.root`

---

<div class="post-metadata">

**Author:** ![Rico](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/r/7c8e57/32.png) [@Rico](https://root-forum.cern.ch/u/Rico)\
**Post date:** [June 17, 2022, 8:57am UTC](https://root-forum.cern.ch/t/how-can-one-use-the-executables-stored-in-the-bin-directory-of-root-installation-folder/50440/3 "2022-06-17T08:57:10Z")

</div>

It works nicely, thank you very much!

---

<div class="post-metadata">

**Author:** ![eguiraud](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eguiraud/32/32217_2.png) [@eguiraud](https://root-forum.cern.ch/u/eguiraud)\
**Post date:** [June 17, 2022, 9:17am UTC](https://root-forum.cern.ch/t/how-can-one-use-the-executables-stored-in-the-bin-directory-of-root-installation-folder/50440/4 "2022-06-17T09:17:22Z")

</div>

Hi @Rico ,

maybe it’s obvious, but just to clarify: although you _can_ call other programs from the ROOT prompt like @Wile_E_Coyote showed, the programs under `/bin` are in general designed to be executed from a shell rather than the ROOT prompt, as standalone utilities. And in general the expectation is that the `/bin` directory with these programs is added to your `PATH` environment variable so these programs are readily available from a terminal or a bash script.

Cheers,  
Enrico

---

<div class="post-metadata">

**Author:** ![Rico](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/r/7c8e57/32.png) [@Rico](https://root-forum.cern.ch/u/Rico)\
**Post date:** [June 17, 2022, 4:12pm UTC](https://root-forum.cern.ch/t/how-can-one-use-the-executables-stored-in-the-bin-directory-of-root-installation-folder/50440/5 "2022-06-17T16:12:25Z")

</div>

For a beginner like me, It wasn’t obvious at all. Thanks!
