I have a .sh file that locally sets some environment variables in my shell source my_env.sh.
.sh
source my_env.sh
#!/bin/sh echo \"Setting up local env
According to Ubuntu env variables doc the best way would be
A suitable file for environment variable settings that affect the system as a whole (rather than just a particular user) is /etc/environment
That's assuming you don't mind having them set for the whole machine.