In the current interactive Bash, make ll expand to ls -alF.
Which command is appropriate?
alias NAME='replacement' defines an interactive command shortcut. Put the definition in a startup file when it must persist.
Detailed explanation
alias ll='ls -alF'Correct. This defines ll as an alias for ls -alF.
Correct. This defines ll as an alias for ls -alF.
export ll='ls -alF'Incorrect. export creates an environment variable, not an alias.
Incorrect. export creates an environment variable, not an alias.
set ll='ls -alF'Incorrect. This is not valid Bash alias syntax.
Incorrect. This is not valid Bash alias syntax.
source ll='ls -alF'Incorrect. source reads a file rather than defining an alias this way.
Incorrect. source reads a file rather than defining an alias this way.
Try it yourself
An example you can run in a temporary verification environment.
bash --noprofile --norc -ic "alias ll='printf alias-ok\\n'; ll"Expected result
alias-okKey points
- alias defines a shortcut
- It expands in an interactive shell
- Persist it in bashrc or a similar file
Notes
- Environment: GNU Bash 5.2 / 一時対話シェル
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.