Q:

SWI Prolog change working directory/get current working directory?

in SWI Prolog terminal how do I view the current working directory and change the current working directory?
I found:
working_directory(CWD, CWD)
but I dont think its what I need

A:

To get the current working directory use working_directory(CWD, CWD).
To change the current working directory use working_directory(_, NewCWD).
Check here to see the manual entry for this predicate.

A:

very easy just open prolog on terminal and write working_directory(CWD,'NewPath').
Ex: working_directory(CWD,'/home/user/prologExerc'). 

