When I run echo $PATH and echo $JAVA_HOME command as a normal user, I get jdk path variables set. But when I run as a root user, the variables are not set there.
I copied maven binary folder to /opt then tried to install maven environment variable using command:
export PATH=/opt/apache-maven-3.3.9/bin:$PATH
When I run mvn -version in the current terminal I see maven variables set but when I run the command from a new terminal, it says maven is not installed.
And when I run mvn -version as a root user, from the current ternimal, it also gives shows maven not being installed.
Please help me to configure maven.
Thank you