LX0-103 · Question #149
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.
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.
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
How the community answered
(35 responses)- A9% (3)
- B3% (1)
- C3% (1)
- E86% (30)
Why each option
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.
'shortcut' is not a valid shell built-in or standard Unix command.
'ln' creates hard or symbolic filesystem links to files or directories, not command aliases.
'sudo' executes a command with elevated (superuser) privileges and has nothing to do with creating shortcuts.
'link' creates a hard link between two files and does not create command shortcuts.
The 'alias' command is a bash built-in that maps a short name to a longer command string, for example 'alias ll="ls -la"'. It is built directly into the shell, requiring no external binary, and persists for the current session or permanently when added to ~/.bashrc or ~/.bash_profile.
Concept tested: bash alias built-in for command shortcuts
Source: https://www.gnu.org/software/bash/manual/bash.html#Aliases
Topics
Community Discussion
No community discussion yet for this question.