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.

25–35 min Week 3 · Productivity, storage, packages, networking Ubuntu terminal
Your outcome: You can customize your session without permanently changing your shell.
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 folder

Creates a friendly listing shortcut.

Run from ~/linux-practice

alias ll='ls -la'
ll
alias ll

Remove aliases

Safe in practice folder

Removes the temporary shortcut.

Run from ~/linux-practice

unalias ll
alias

Bypass an alias

Safe in practice folder

Runs the original command even if an alias exists.

Run from ~/linux-practice

alias ls='ls --color=auto'
command ls
\ls

Put it into practice

  1. 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.

  1. How do you remove an alias?
  2. Why are temporary aliases safe for beginners?

Your practice, your pace

Loading saved progress…

Discussion

Continue the conversation about this guide. Loading comments connects to GitHub Discussions through giscus.

Open community discussions on GitHub

Check before you copy

This command needs care. Read its context, confirm the target and location, and keep a recovery path.

Copying does not run a command.