Monday, June 6, 2022

[SOLVED] Linux Mint - adding environment variables permanently

Issue

I was trying to modify the ~/.profile file to add a line to the PATH variable. I added this line:

PATH=$PATH:/home/paul/avatar-gf-1.0-ea/glassfish4/bin/

at the end. I restarted the terminal, but it still did not identify commands in that directory. Does anyone know what I am doing wrong?


Solution

Try this in the ~/.pam_environment in your home folder. If it does not exist then create it:

PATH DEFAULT=${PATH}:/home/paul/avatar-gf-1.0-ea/glassfish4/bin/

You will need to log in and out.



Answered By - oceanexplorer
Answer Checked By - Candace Johnson (WPSolving Volunteer)