Mission 16 of 30
Aliases and Command Shortcuts
Create shortcuts that improve a session without hiding dangerous behavior.
Create temporary shortcuts that make the terminal friendlier without editing startup files yet.
Your outcome: You can customize your session without permanently changing your shell.
Practice inside
Practice inside
~/linux-practice. Check your setup before you begin.
Prerequisite: Environment Variables
.
What you’ll practice
- Create aliases
- List and remove aliases
- Bypass aliases
The mental model
- Aliases are shell shortcuts.
- Temporary aliases disappear when the terminal closes.
- command and backslash bypass aliases.
Try it in your terminal
Create and inspect aliases
Safe in practice folderCreates a friendly listing shortcut.
Run from ~/linux-practice
alias ll='ls -la'
ll
alias ll Remove aliases
Safe in practice folderRemoves the temporary shortcut.
Run from ~/linux-practice
unalias ll
alias Bypass an alias
Safe in practice folderRuns the original command even if an alias exists.
Run from ~/linux-practice
alias ls='ls --color=auto'
command ls
\ls Put it into practice
- Create alias today='date +%Y-%m-%d', run it, then unalias it.
Check your result
The alias expands correctly and can be bypassed or removed.
Common mistakes
- You close the terminal, open a new one, type `ll`, and get 'command not found.' Temporary aliases live only in the session that created them. They vanish when the shell closes.
Check your understanding
Explain these in your own words. If you’re unsure, revisit the examples before moving on.
- How do you remove an alias?
- Why are temporary aliases safe for beginners?
Your practice, your pace
Loading saved progress…