Environment variables can be set using EXPORT command. This command should be run before we make use of the environment variable. Instead of running this command everytime manually after login, we could request Ubuntu to execute this command on startup.
- Open terminal
- Run below command i.e.; open bash.bashrc file in editor
- Add export commands to the file at the very end (Shift+G and then Press a to start appending the content)
That's it... restart Ubuntu, your environment variables are set by default when you login from next time