Linux/Ubuntu Set Environment Variable

Sep 15, 2020
export RUNTIME_API_URL=http://localhost:3000

For permanent environment variable after restart

  • You can set the environment variable via script before running the code/program
  • via ~/.bashrc (or /home/USER/.bashrc). Make sure to target the user used to run the code/program.

❤️ Is this article helpful?

Buy me a coffee ☕ or support my work via PayPal to keep this space 🖖 and ad-free.

Do send some 💖 to @d_luaz or share this article.

✨ By Desmond Lua

A dream boy who enjoys making apps, travelling and making youtube videos. Follow me on @d_luaz

👶 Apps I built

Travelopy - discover travel places in Malaysia, Singapore, Taiwan, Japan.