.. include:: ../header.txt .. _source: :command:`source` =========================== .. index:: source .. program:: source .. describe:: source Execute a shell script using the current shell. SYNOPSIS :command:`source` script [ARGS ...] :command:`\.\ ` script [ARGS ...] .. note:: The :command:`source` command and a period followed by a space, `\.\ `, are equivalent. The shell script is ran within the current shell. That is to say, the shell does not first `fork()` and start a new shell to run the script. The primary reason for *sourcing* a script is if the script will assign environment variables. By using :command:`source`, the variables may be set in the current shell. There is sometimes confusion between :command:`source` and :command:`exec`, because :command:`exec` also does not `fork()` first. The intent of :command:`exec` is to replace the shell with a new program, i.e., the current shell does not run again.