A file contains reusable command sequences you want accessible in your open shell session without invoking another shell process. Which built-in command loads its contents into your present environment?
The built-in command reads the given file and executes its lines within the current shell, making its functions and variables available immediately. Using sh or ./ launches a child process, isolating any definitions; exec replaces the current shell, preventing return to the original session.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does the 'source' command do in a shell?
Open an interactive chat with Bash
What happens when you use 'sh' or './' to run a shell script?
Open an interactive chat with Bash
What is the difference between 'source' and 'exec' commands?