In the current interactive Bash, make ll run ls -alF.
Which command is appropriate?
alias NAME='replacement' creates a simple interactive command abbreviation; functions are better for complex argument handling.
Detailed explanation
function ll=ls -alFIncorrect. This is not valid Bash function syntax.
Incorrect. This is not valid Bash function syntax.
export ll='ls -alF'Incorrect. export creates an environment variable, not a command alias.
Incorrect. export creates an environment variable, not a command alias.
alias ll='ls -alF'Correct. It defines ll as an alias for ls -alF.
Correct. It defines ll as an alias for ls -alF.
set ll='ls -alF'Incorrect. set does not define aliases.
Incorrect. set does not define aliases.
Try it yourself
An example you can run in a temporary verification environment.
bash --noprofile --norc -ic "alias ll='printf alias-ok'; alias ll" 2>/dev/nullExpected result
alias ll='printf alias-ok'Key points
- alias NAME='...'
- Interactive expansion
- Functions for complex logic
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.