Tags

, , , , ,

How to display environment or system variables in your terminal ?
In Linux:
$ printenv – Print all or part of environment.
$ env – Print all exported environment or run a program in a modified environment.

In Windows:
$ SET
$ SET | more

Display PATH variables
$ PATH
======================================
How to display Rubygems variables ?
$ gem env

How to set environment variables permanently ?
In Linux
$ vi ~/.bashrc


export PATH=”/home/mh/.phpenv/bin:$PATH”
export MONGODB_URL_DEV=mongodb://192.168.99.100:27017/microblog-express-node-mongodb
$ source ~/.bashrc
That’s it!

 

 

Advertisements