What are environment variables?

This is a discussion on What are environment variables? within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Hi, What are environment variables? I see this term in dos and in some Linux stuff. What are they used ...

  1. #1
    Registered User Nutshell's Avatar
    Join Date
    Jan 2002
    Posts
    1,020

    What are environment variables?

    Hi,

    What are environment variables? I see this term in dos and in some Linux stuff. What are they used for? Why need them? When use them? How to use them?

    thnx

  2. #2
    Registered User foniks munkee's Avatar
    Join Date
    Nov 2001
    Posts
    343
    An environment variable is a variable maintained by your OS or shell that stores information regarding ones current operating environment.

    For instance in the UNIX environment, you can query your shell for information regarding where you current temp directory is pointing at, what the max number of lines your history file will store - all sorts of fun things (and more important than these examples but.. my mind is real slow right now..). Very useful in shell programming - and just everyday admining..
    Last edited by foniks munkee; 02-18-2002 at 02:02 AM.

  3. #3
    Registered User Nutshell's Avatar
    Join Date
    Jan 2002
    Posts
    1,020
    What are in windows?

  4. #4
    Banned maes's Avatar
    Join Date
    Aug 2001
    Posts
    744
    in windows, right click on my computer=>properties=>advaced=>environment variables

  5. #5
    5|-|1+|-|34|) ober's Avatar
    Join Date
    Aug 2001
    Posts
    4,429
    environment variables can be anything from your temp file in windows to which editor loads when you type "ed" in linux at the command line.. the cool thing about linux is that it's so easy to setup your own environment variables so that the OS does what you want it to do exactly how you want it... Windows is a little more canned in this sense..

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. esbo's data sharing example
    By esbo in forum C Programming
    Replies: 49
    Last Post: 01-08-2008, 10:07 PM
  2. Global Variables
    By Taka in forum C Programming
    Replies: 34
    Last Post: 11-02-2007, 03:25 AM
  3. Replies: 2
    Last Post: 04-28-2007, 01:05 PM
  4. Setting environment variables.
    By Ezzetabi in forum C++ Programming
    Replies: 10
    Last Post: 07-26-2005, 08:30 AM
  5. functions to return 2 variables?
    By tim in forum C Programming
    Replies: 5
    Last Post: 02-18-2002, 01:39 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21