You can create an environment variable in Linux temporarily or permanently so that it applies in new terminal windows or during the next restart.
To create a temporary environment variable that will work in the terminal window that you are currently in, you can use the ‘export‘ command as shown below:
export MYENV="Testvalue"
To create a permanent environment variable that persists after your computer or server restarts, you would place the export command above in the ‘.bashrc‘ file in your home directory.
You can check if it worked using the ‘echo‘ command as shown below:
echo $MYENV
