### 4.8.1 Working directories

Xcas has a working directory that it uses to store files that it creates; typically the user’s home directory. You can print the name of the current working directory with the pwd() command; if you enter

pwd()

you might get something like

/home/username

You can change the working directory with the cd command; if you enter

cd("foo")

or (on a Unix system)

cd("/home/username/foo")

will change to the directory foo, if it exists. Afterwards, any files that you save from Xcas will be in that directory.

If you have values saved in a file, then you’ll need to be in that working directory to load it. Note that if you have the same file name in different directories, then the result of loading the file name will depend on which directory you are in.