System Management

A user wants the shortcut ll, defined as ls -alF, to be available in the current bash session immediately and in every future interactive bash session for that user. Which approach achieves both?

Show the answer

Correct answerA. Add the alias line to ~/.bashrc, then run source ~/.bashrc

Placing the alias in ~/.bashrc makes it persistent, and source runs the file in the current shell so the alias applies immediately. Running bash ~/.bashrc is tempting, but it starts a child shell, so the alias disappears when that shell exits.