Hi everyone,
So environment and shell variables are confusing me a bit.
Where are the configuration files that require editing to persistently set variables?
I have found my $PATH in '/etc/environment' to which I added '~/bin' as when I ran 'PATH=$PATH:~/bin' in the terminal the change was not persistent. However that is the only variable listed within the file, in fact it's the only thing in there.
/etc/profile is full of a load of human readable jargon (maybe a script) but being a Linux layman I have no idea what that's all about.
I guess my questions are...
- Where are the config files that store environment variables?
- Why do a lot of guides tell the reader to use 'export' to set environment / shell variables, as I understand the variables set in this way are not persistent and will only be inherited by the child processes of the terminal that the 'export' command is run in?
- What is the difference between exporting a variable, and simply running 'VARIABLE=value'
- Is the GUI technically a login shell? (in Ubuntu 20.04)
Thanks!
Bookmarks