[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

getenv

Syntax

 
#include <stdlib.h>

char *getenv(const char *name);

Description

Get the setting of the environment variable name. Do not alter or free the returned value.

Return Value

The value, or NULL if that variable does not exist.

Portability

ANSI/ISO C C89; C99
POSIX 1003.2-1992; 1003.1-2001

Example

 
char *term = getenv("TERM");