Did you know ... Search Documentation:
Site and personal initialisation files

On startup, SWI-Prolog reads both site initialisation and personal initialisation files. Both can be controlled explicitely using commandline options (-F base for site, and -f base for personal initialisation).

The site-initialisation file is located in the SWI-Prolog home directory. Its name is deduced from the commandname by taking the leading alphanumerical characters, followed by the extension .rc. Using default installation this implies swipl.rc for the Unix version and swipl-win.rc for the Windows GUI version.

If XPCE is installed, it is activated through the above named system default file.

The personal initialisation file is called .plrc on Unix and pl.ini on Windows. It is searched using the file_search_path/2 alias user_profile. This refers to the current working directory or the users home/profile directory.

In plwin.exe, the personal initialisation file is accessible through the Settings menu. On first use, it copies a default file with some commented commonly used customization options. The same behaviour is also available from the PceEmacs menu Edit/Prolog preferences.

The -s file commandline option is often used on Unix systems to load and start applications using a single command. In can also be used to create PrologScript files.