Ngô Quốc Huy
New member
How do I change environment variables in Linux?
Answer
To make an environment persistent for a user’s environment, we export the variable from the user’s profile script.
Answer
To make an environment persistent for a user’s environment, we export the variable from the user’s profile script.
- Open the current user’s profile into a text editor. vi ~/.bash_profile.
- Add the export command for every environment variable you want to persist. export JAVA_HOME=/opt/openjdk11.
- Save your changes.