Shell and Environment

.

POSIX shorthand for source.

The dot command reads and executes a file in the current shell environment.

Syntax
. file

Arguments explained

  • Options adjust output or behavior.
  • Arguments name the files, services, hosts, or values the command should work with.

Common examples

Load a profile file
. ~/.profile

Runs ~/.profile in the current shell.

Compare with source
source ~/.profile

Bash and Zsh also support the source spelling.

. Command
FieldDetails
Command.
CategoryShell and Environment
Primary usePOSIX shorthand for source.
Syntax. file