In addition to the post @jdtournier referenced, it may be worth also looking into using anaconda environments. It depends on what version you want to become your default.
If you want to keep your current install as the default (for now), you can install MRtrix 3.0.0 in a new conda environment like this:
$ conda create -n mrtrix3 -c MRtrix3 mrtrix3
-n mrtrix3 sets the environment name;
-c MRtrix3 is the channel; the last
mrtrix3 is the package name to be installed.)
To use the new release, you then need to activate the environment:
$ conda activate mrtrix3
(mrtrix3) $ mrinfo --version
== mrinfo 3.0.0 ==
This version then stays active until the end of the session (e.g., until you close the terminal);
conda deactivate will also revert to your current installed version.
If you want to make the new release the default, you will have to manage your path manually using the instructions @jdtournier referenced. In short, you should do a fresh install of the new release and redirect your PATH to this new install. Then, you can make an alias to activate the legacy version in your
alias mrtrix3old="export PATH=/path/to/old/mrtrix:$PATH"