# How can I install Gromacs in a desired path?

**URL:** <https://gromacs.bioexcel.eu/t/how-can-i-install-gromacs-in-a-desired-path/10353>\
**Category:** User discussions\
**Created:** [October 16, 2024, 10:20am UTC](https://gromacs.bioexcel.eu/t/how-can-i-install-gromacs-in-a-desired-path/10353 "2024-10-16T10:20:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mj.rezayani](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/mj.rezayani/32/3918_2.png) [@mj.rezayani](https://gromacs.bioexcel.eu/u/mj.rezayani)\
**Post date:** [October 16, 2024, 10:20am UTC](https://gromacs.bioexcel.eu/t/how-can-i-install-gromacs-in-a-desired-path/10353/1 "2024-10-16T10:20:59Z")

</div>

Dear Gromacs Users,

I have Gromacs version 2022 on my computer. I want to install the 2024 version along with the 2022 version. How can I install it on a different path? The default path is /usr/local/ **gromacs** /bin/GMXRC but I want to have the newer version in this path: /usr/local/ **gromacs-2024** /bin/GMXRC.

Thanks

---

<div class="post-metadata">

**Author:** ![al42and](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/al42and/32/1393_2.png) [@al42and](https://gromacs.bioexcel.eu/u/al42and)\
**Post date:** [October 16, 2024, 11:05am UTC](https://gromacs.bioexcel.eu/t/how-can-i-install-gromacs-in-a-desired-path/10353/2 "2024-10-16T11:05:30Z")

</div>

Hi!

Please see [the install guide](https://manual.gromacs.org/documentation/current/install-guide/index.html#non-standard-location):

> GROMACS is installed in the directory to which `CMAKE_INSTALL_PREFIX` points. It may not be the source directory or the build directory. You require write permissions to this directory. Thus, without super-user privileges, `CMAKE_INSTALL_PREFIX` will have to be within your home directory. Even if you do have super-user privileges, you should use them only for the installation phase, and never for configuring, building, or running GROMACS!

So, in your case, you should add `-DCMAKE_INSTALL_PREFIX=/usr/local/gromacs-2024/` flag when calling `cmake`.

---

<div class="post-metadata">

**Author:** ![mj.rezayani](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/mj.rezayani/32/3918_2.png) [@mj.rezayani](https://gromacs.bioexcel.eu/u/mj.rezayani)\
**Post date:** [October 16, 2024, 11:20am UTC](https://gromacs.bioexcel.eu/t/how-can-i-install-gromacs-in-a-desired-path/10353/3 "2024-10-16T11:20:47Z")

</div>

Dear!

Thanks a lot for your help.
