How do I export credentials as environment vars from a shell script? How do I export credentials as environment vars from a shell script? shell shell

How do I export credentials as environment vars from a shell script?


Two changes:

  1. Fix your variable assignment syntax:

    export USERNAME='user'
  2. To make this value always available to user, append the above code line to the file ~/.profile; this will set the variables during login, such that this will not need to be manually invoked at other times.