Shells and Environment Variables on Unix and Windows ----------------- To find out which shell you are using run: % ps For example, if you see this: [changliu@p2 changliu]$ ps PID TTY TIME CMD 8235 pts/16 0:00 bash [changliu@p2 changliu]$ you are running bash. ----------------- To set environment variables in csh, run: % setenv CVS_RSH ssh (here, the environment variable is CVS_RSH, its value will be "ssh") ----------------- To set environment variables in bash, run: % export CVS_RSH=ssh (here, the environment variable is CVS_RSH, its value will be "ssh") ----------------- To set an environment variable on Windows: Right click on "My Computer", choose "Properties", choose "Advanced Tab", click on "Environment Varaibles". You need to restart the command prompt window after you change environment variable setting. ----------------- To check the value of an environment variable, run: % env or % env | grep "CVS_RSH" or, on Windows, run: C:\>set or C:\>set | grep JWSDP_HOME Example: D:\jwsdp-1.1>set | grep HOME HOMEDRIVE=D: HOMEPATH=\Documents and Settings\changliu JAVA_HOME=D:\j2sdk1.4.1_02\ D:\jwsdp-1.1> To automatically set environment variables every time you log on, modify files .login, .bash_profile, .cshrc, or .bashrc, depending on which shell you use. -Chang Liu Tue Apr 08 16:06:25 EDT 2003