[Up] [Contents] [Index] [Summary]

2.1 Starting SWI-Prolog from the Unix Shell

It is advised to install SWI-Prolog as `pl' in the local binary directory. SWI-Prolog can then be started from the Unix shell by typing `pl'. The system will boot from the system's default boot file, perform the necessary initialisations and then enter the interactive top level.

After the necessary system initialisation the system consults (see consult/1) the user's initialisation file. This initialisation file should be named `.plrc' and reside either in the current directory or in the user's home directory. If both exist the initialisation file from the current directory is loaded. The name of the initialisation file can be changed with the `-f file' option. After loading the initialisation file SWI-Prolog executes a user initialisation goal. The default goal is a system predicate that prints the banner message. The default can be modified with the `-g goal' option. Next the toplevel goal is started. Default is the interactive Prolog loop (see prolog/0). The user can overwrite this default with the `-t toplevel' option.


Section Index