3.2 Home and current directories

Home directory

Every Unix user has a special home directory, which in the preceding example is called /home/ugrad/myname. Your home directory is a convenient place to keep your own working files. An abbreviation for your home directory is ~ (the tilde character), so the file /home/ugrad/myname/Dir2/Project.m could also be specified by the pathname ~/Dir2/Project.m

Current directory

Every program running in Unix has a current, or working directory. If you are using a command line interface, then the shell keeps track of your current directory, which initially is set to your home directory. Programs with graphical interfaces tend to use your home directory as a default, but they may use the directory from which you first launched the program.

The current directory is important because it is the basis for relative pathnames.

Keith Orpen, who is still writing this, would like to hear your comments and suggestions.