How to Set Permanent Environment Variable in Ubuntu
Ғылым және технология
Learn how to set permanent environment variable in Ubuntu.
The version of Ubuntu I am using in this demo is Ubuntu 20.04.
There are a lot of question around how do I add environment variables. And the most common one would be how to permanently set an environment variable so that it is persisted even after power cycling the Ubuntu distribution.
Towards the end I will also demonstrate how to setup permanent PATH variable to your HOME directory.
#ubuntu, #linux,
Пікірлер: 5
Hey! Thanks for providing such insightful stuff. Really appreciate you. However, Can you please guide me how to delete the permanent env var (such as test=481216) from the set of variables?
@RabiGurungXybernetics
9 ай бұрын
Noted
the bashrc...with the variable.. does is it need to be in root home directory?
@RabiGurungXybernetics
9 ай бұрын
It depends on who is logged in. If you for example is a user called geirha75 is logged in, you will need to edit the bashrd file in your home directory.
@geirha75
9 ай бұрын
@@RabiGurungXybernetics In my Ubuntu experience when setting own variable I haven't been able to use use it when used inside a python script with crontab. Running the script manually not with crontab works ok.