# Set Linux shell environment variable

**URL:** <https://discourse.nodered.org/t/set-linux-shell-environment-variable/41762>\
**Category:** General\
**Created:** [28 February 2021 17:59 UTC](https://discourse.nodered.org/t/set-linux-shell-environment-variable/41762 "2021-02-28T17:59:17Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Andrei](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei/32/10446_2.png) [@Andrei](https://discourse.nodered.org/u/Andrei)\
**Post date:** [1 March 2021 02:21 UTC](https://discourse.nodered.org/t/set-linux-shell-environment-variable/41762/2 "2021-03-01T02:21:17Z")

</div>

You could set the environment variable in the settings file as explained in below link.

> [@How to set env variable](https://discourse.nodered.org/t/how-to-set-env-variable/18612/5):
>
> One way of setting environment variables is in your settings.js file. The following will set the env var MY\_ENV\_VAR: process.env.MY\_ENV\_VAR = "Hello World"; You can add lines like that to the top of your settings file. The other option is to set them completely outside of Node-RED in shell you are running Node-RED in. How you do that will depend on your OS and how you are running Node-RED.

---

_[View the full topic](https://discourse.nodered.org/t/set-linux-shell-environment-variable/41762)._
