# Installing MRtrix3 without giving up MRtrix 2.12

**URL:** https://community.mrtrix.org/t/installing-mrtrix3-without-giving-up-mrtrix-2-12/1400
**Category:** Uncategorized
**Tags:** installation
**Created:** [January 10, 2018, 3:10pm UTC](https://community.mrtrix.org/t/installing-mrtrix3-without-giving-up-mrtrix-2-12/1400 "2018-01-10T15:10:16Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![jdtournier](https://community.mrtrix.org/user_avatar/community.mrtrix.org/jdtournier/32/2594_2.png) [@jdtournier](https://community.mrtrix.org/u/jdtournier)
#### Post date: [January 11, 2018, 1:21pm UTC](https://community.mrtrix.org/t/installing-mrtrix3-without-giving-up-mrtrix-2-12/1400/2 "2018-01-11T13:21:55Z")

</div>

Sure, I also need to do this all the time, not just between _MRtrix_ 0.2 and 3, but also between different versions of _MRtrix3_ itself… There’s a few options, but probably the simplest is to only keep one of the versions in your PATH (the one you actually use the most), and invoke the other version by specifying the full path to the executable, or amend the `PATH` when you need to.

For example, I have _MRtrix_ 0.2 and _MRtrix3_ installed in the folders `mrtrix2` and `mrtrix3` respectively within in my home folder. My PATH includes `/home/donald/mrtrix3/bin`, but nothing related to `mrtrix2` (you can check your PATH by typing `echo $PATH`). This means I’ll always be using my main _MRtrix3_ install by default. If I need to invoke a command from _MRtrix_ 0.2, I can do so by invoking the command using its full path, like this:

```auto
$ ~/mrtrix2/bin/streamtrack SD_PROB fod.mif ...

```

or

```auto
$ /home/donald/mrtrix2/bin/streamtrack SD_PROB fod.mif ...

```

This basically sidesteps the normal `PATH` lookup.

* * *

If you want to run a session where all the commands are guaranteed to be the older version, you can always amend the `PATH` directly on the command-line:

```auto
$ export PATH=~/mrtrix2/bin:$PATH

```

at which point all subsequent command lookups within that shell session will look in the `~/mrtrix2/bin` folder first, so use that version preferentially. You can of course also include this at the head of your scripts, etc. as required.

* * *

Finally, if you need to do this often, you can also include a line like this in your `~/.bashrc` file (or whichever is the correct startup script on your system):

```auto
alias mrtrix2="export PATH=~/mrtrix2/bin:$PATH"

```

You’ll then be able to simply type `mrtrix2` at the terminal, and it’ll amend your `PATH` to use the _MRtrix_ 0.2 commands preferentially.

---

_[View the full topic](https://community.mrtrix.org/t/installing-mrtrix3-without-giving-up-mrtrix-2-12/1400)._
