Categories
Uncategorized

Environmental Variables in Ubuntu 1804

Modify .bashrc

[su_note]export GMAIL=”myemail@gmail.com”

export GPASSWORD=”mygmailpassword@gmail.com”

[/su_note]

To test it, create a python file

[su_note]

import os

email = os.environ.get(‘GMAIL’)

p = os.environ.get(‘GPASSWORD’)

print (email)

print (p)

[/su_note]