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.
export ll='ls -alF'Incorrect. export creates an environment variable, not an alias.
set ll='ls -alF'Incorrect. This is not valid Bash alias syntax.
source ll='ls -alF'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
Alias
A shell definition that expands a command name to another string for interactive input.
Alias expansion
Replacement of a command's leading word before the shell executes it.
Shell namespace
Variables, functions, aliases, and options are separate kinds of shell state.