Command gmx is not found with sudo

GROMACS version: 2020.2
GROMACS modification: No

Dear friends, I have just installed gromacs-2020.2 in my Ubuntu terminal. I am trying to run a simple simulation on 10 methane molecules in 1000 water molecules. Previously, I had used gromacs-5.1.1 which was very outdated and I ran all my command beginning with sudo gmx. However with my new version of gromacs (gromacs-2020.2), I get an error saying the command is not found. I have attached a picture to this post. Please, let me know if you are aware of any solutions to this problem. Any help is appreciated.

Best regards,
Rosa

Do not run routine commands as super user. This is very dangerous. Likely you are getting “command not found” because the super user environment is not configured to have GROMACS in its $PATH. Configure the environment for you to use and do not invoke sudo.

Dear Justin,

Thank you for your reply. The problem has been resolved.

Best regards,
Rosa