7.4 System Environmental Variables
In a typical operating system, several system-wide parameters are defined which tune the behaviour of the programs executed on that system. These environment variables, as they are called, can be accessed via the third argument in the main(int argc, char *argv[], char *env[]) function header. Some of the more common environment variables are:
HOSTNAME name of the computer
BASH the shell program in use
CLASSPATH a list of paths for Java classes and jar libraries
HOME the home directory of the current user
HZ the rate of basic timer interrupt
JAVA_HOME place where the Java system is stored
MANPATH a list of paths where manual pages can be found
PS1, PS2 the primary and secondary prompt strings
TERM the type ...
Get Compilers: Principles and Practice now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.