CompTIA
LX0-103 · Question #149
LX0-103 Question #149: Real Exam Question with Answer & Explanation
The correct answer is E. alias. The 'alias' built-in in bash allows users to define shorthand names for longer or frequently used commands. No other listed option provides this shell-level pseudonym functionality.
GNU and Unix Commands
Question
Which shell built-in command can be used to create a shortcut or pseudonym for a longer command? Assume a modern bournE.like shell, such as bash.
Options
- Ashortcut
- BIn
- Csudo
- Dlink
- Ealias
Explanation
The 'alias' built-in in bash allows users to define shorthand names for longer or frequently used commands. No other listed option provides this shell-level pseudonym functionality.
Common mistakes.
- A. 'shortcut' is not a valid shell built-in or standard Unix command.
- B. 'ln' creates hard or symbolic filesystem links to files or directories, not command aliases.
- C. 'sudo' executes a command with elevated (superuser) privileges and has nothing to do with creating shortcuts.
- D. 'link' creates a hard link between two files and does not create command shortcuts.
Concept tested. bash alias built-in for command shortcuts
Reference. https://www.gnu.org/software/bash/manual/bash.html#Aliases
Topics
#shell commands#alias#bash#command shortcuts
Community Discussion
No community discussion yet for this question.