0
0
Linux CLIscripting~5 mins

Aliases for shortcuts in Linux CLI - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is an alias in the Linux command line?
An alias is a shortcut name that stands for a longer command or a series of commands. It helps you type less and work faster.
Click to reveal answer
beginner
How do you create a temporary alias in Linux?
Use the command: alias name='command'. For example, alias ll='ls -l' creates an alias ll for ls -l.
Click to reveal answer
intermediate
How can you make an alias permanent in Linux?
Add the alias command to your shell's configuration file like ~/.bashrc or ~/.zshrc. This way, the alias loads every time you open a terminal.
Click to reveal answer
beginner
What command shows all current aliases?
Use the command alias with no arguments to list all active aliases in your current shell session.
Click to reveal answer
beginner
How do you remove an alias in the current session?
Use the command unalias name. For example, unalias ll removes the alias named ll.
Click to reveal answer
Which command creates a temporary alias named 'gs' for 'git status'?
Aalias gs='git status'
Balias 'git status' = gs
Cgs = alias git status
Dcreate alias gs git status
Where should you add alias commands to make them permanent?
A/etc/aliases
B~/.bashrc or ~/.zshrc
C/usr/bin/aliases
D~/.aliasfile
What does the command unalias ll do?
ALists all aliases
BCreates a new alias named 'll'
CRenames alias 'll'
DRemoves the alias named 'll' in the current session
How can you see all aliases currently active in your shell?
Aalias
Bshow aliases
Clist alias
Dalias -l
Why use aliases in the command line?
ATo change file permissions
BTo delete files faster
CTo save typing and speed up commands
DTo create new users
Explain how to create, list, and remove aliases in Linux.
Think about the commands alias and unalias.
You got /3 concepts.
    Describe how to make an alias permanent so it works every time you open a terminal.
    Consider shell configuration files.
    You got /3 concepts.