Our Blog

News, thoughts & useful links

Contact: Skype , email or call
+44 (0) 131 556 6818

Setting environment variables in CentOS

May 23rd, 2008 by Anton

If you are using Bash as your terminal, here’s what you need to do:

Edit ~/.bash_profile by adding the following (if you want to set TESTVAR variable to “This_is_a_value” value)


export TESTVAR=This_is_a_value


2 Responses to “Setting environment variables in CentOS”

  1. Mukesh says:

    Fine but how can i test it.
    Can you say the command to display the value TESTVAR in terminal

  2. anton says:

    Try “set” command in bash terminal. That should display all env variables set for your session