0

Example when start a Virtualenv of python. It will need to type . someenv/bin/activate. However, even if it works fine, I still a little bit confuse about how it works.

Is there anyone who can give me a explanation in more general view about . command in shell?

pah8J
  • 237
  • 1
  • 3
  • 9

1 Answers1

2

. is a synonym to source in bash. To sum up, it executes a script within the current shell, instead of executing it in a subshell. This means that anything changed in the environment by the script will persist in the shell after the script has ended.

Have a look at this question, which is basically the same as yours : What's the meaning of a dot before a command in shell?

Vince
  • 131