Issue
I am new in AWS I am using an Ubuntu server and I use export in the shell to set environmental variables.
export mykey=value
But when I close the shell and relogin I see that mykey does not available the environmental variable. As far as I search in the net, such way of setting will expire directly after shell is closed. How could I have a permanent environmental variable in AWS then? Thanks
Solution
You could edit the ~/.bashrc file by adding export mykey=value
command to have it every time the shell reloads. Environmental variables are not saved when you exit all the instances of the shell. But everytime shell opens, it reads the bashrc file, if you are in a bash shell. For zsh, it would be ~/.zshrc for example.
Answered By - aboitier Answer Checked By - Mary Flores (WPSolving Volunteer)