cmake installed but showing bashrc: cmake: command not found

Hello all
I am trying to install GROMACS on GPU. I have installed latest cmake 3.26.0_rc3 but when i am trying to configure GROMACS as per instructions given, it gives me the error of cmake: command not found. Now as per my understanding I am probably not giving the path variable where it is installed. or do i need to change header in .bashrc? I know it is installed because when I check the version in /opt/cmake/bin/cmake -version, it gives me the version details. I am stuck, would be really glad if you could help.

Thanks

Hello!

Since you have your CMake binary at /opt/cmake/bin/cmake, you should add something like

PATH="/opt/cmake/bin/${PATH:+:${PATH}}"

to your .bashrc.

Or you can use the full path, /opt/cmake/bin/cmake, instead of simply cmake in your commands.