DEV Community

Play Button Pause Button

Posted on

How to set up environment variables in Linux Machine.

If you ever took a tutorial on Node.Js you will often here instructors saying listen the server to the process.env.PORT but where is this PORT thing.

In this video i show you quickly how to setup your own environment variables, step by step

  1. Edit the /etc/environment file with sudo privileges.
  2. Add your variable name without any space in be between like this name="me"
  3. Reboot the system
  4. You can now use that environment variable.

Top comments (0)