Variables can also be defined in one of your login shell's startup scripts. Depending on what shell you're using (not necessarily that shell that is used to run the script you're asking about), the startup scripts could have different names. You might start by looking at a file named .profile in your home directory and at the file named /etc/profile .