Forrest logo
back to the source tool

source:tldr:e5561

source: Evaluate contents of a given file.
$ source ${filename}
try on your machine

The command "source ${filename}" is a shell command used to load and execute the commands present in a specified file within the current shell session.

Here is a breakdown of the command:

  • "source" is a shell built-in command, also known as "dot" command or "." command. It is used to read and execute commands from a file within the current shell environment.
  • "${filename}" is a placeholder for the name of the file that you want to source. You need to replace "${filename}" with the actual name or path of the file you want to load.

When you run the command "source ${filename}", the shell reads the specified file and treats each line as a separate command to be executed in the current shell session. This allows you to define functions, variables, or perform various setups in the file, and have them instantly available in the current session.

Note: The "source" command may vary slightly among different shells. In certain shells (such as bash), you can also use a period (.) instead of "source" to achieve the same result.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the source tool