re: 101 Bash Commands and Tips for Beginners to Experts VIEW POST

VIEW PARENT COMMENT VIEW FULL DISCUSSION
 

More about source

In some systems source and . are interchangeable command. (POSIX compatibility is swamp)

Anyway source command is good if you need (temporary) setup your environment: e.g. load environment variables, aliases and even request passwords from user with read -s <variable_name> or to load functions from external libraries.

Usually source is used in scripts(1) but I'm sure that users can find use cases when to use source to setup environment for running shell.

code of conduct - report abuse