Dot (command)
In a Unix shell, the full stop called the dot command (.) is a command that evaluates commands in a computer file in the current execution context. In the C shell, a similar functionality is provided as the source command, and this name is seen in "extended" POSIX shells as well. The dot command is not to be confused with a dot file, which is a dot-prefixed hidden file or hidden directory. Nor is it to be confused with the ./scriptfile notation for running commands, which is simply a relative path pointing to the current directory (notated in Unix as a '.' character, and typically outside of the Path variable).
In a Unix shell, the full stop called the dot command (.) is a command that evaluates commands in a computer file in the current execution context. In the C shell, a similar functionality is provided as the source command, and this name is seen in "extended" POSIX shells as well. The dot command is not to be confused with a dot file, which is a dot-prefixed hidden file or hidden directory. Nor is it to be confused with the ./scriptfile notation for running commands, which is simply a relative path pointing to the current directory (notated in Unix as a '.' character, and typically outside of the Path variable). == source == source is a shell built-in command that evaluates the file following the command, as a list of commands, executed in the current context. Frequently the "current context" is a terminal window into which the user is typing commands during an interactive session. The source command can be abbreviated as just a dot ( . ) in Bash and similar POSIX-ish shells. However, this is not acceptable in C shell, where the command first appeared. Some Bash scripts should be run using the source your-script syntax rather than run as an executable command, e.g., if they contain a change directory ( cd ) command and the user intends that they be left in that directory after the script is complete, or they contain an export command and the user wants to modify the environment of the current shell. Another usage situation is when a script file does not have the "execute" permission. Passing the script filename to the desired shell will run the script in a subshell, not the current context. ==External links== The three different uses of the dot in Unix explained
References
No reference rows published for this article.
Cite this article
MLA
"Dot (command)." encyclopegia.org, 2026, https://encyclopegia.org/wiki/dot-command. Accessed 24 November 2026.
Chicago
"Dot (command)." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/dot-command.
APA
encyclopegia.org. (2026). Dot (command). Retrieved November 24, 2026, from https://encyclopegia.org/wiki/dot-command
Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON