Keyword variables are either inherited or declared and initialized by the shell when it starts. You can assign values to these variables from the command line or from a startup file. Typically these variables are environment variables (exported) so they are available to subshells you start as well as your login shell.
By default, your home directory is the working directory when you log in. Your home directory is established when your account is set up; under Linux its name is stored in the /etc/passwd file. Mac OS X uses Open Directory (page 1042) to store this information.
$ grep sam /etc/passwdsam:x:500:500:Sam the Great:/home/sam:/bin/bash
When you log in, the shell inherits the pathname of your ...