vmware / pyvmomi-community-samples

A place for community contributed samples for the pyVmomi library.
Apache License 2.0
1.01k stars 922 forks source link

Add example on how to set up environment variables #747

Open ibarrae opened 5 months ago

ibarrae commented 5 months ago

Is your feature request related to a problem? Please describe.

Hey everybody, I would like to see an example of how to set up (global) environment variables on the VM so it's available during shell/cmd line usage. For instance, having some env var like FOO=123 available so I can do the following in the VM:

$ echo $FOO
123

Describe the solution you'd like

An example on how to set up environment variables in the VM

Describe alternatives you've considered

No response

Additional context

No response

pacman2011 commented 5 months ago

To set system-wide Linux environment variables, you can edit the /etc/environment file.

Instead of appending export commands to the file, append the <NAME>='<VALUE>' pair to the end of the file.