Skip to content

alias command

Create short names for long commands.

On this page

Syntax

alias name='command'unalias name

Provided by the shell builtin package. Run man alias for the full manual.

Common options

OptionWhat it does
(no args)List all aliases
-pPrint aliases in reusable form
unalias NAMERemove an alias
\nameRun the original command, skipping the alias

Examples

  1. List aliases

    alias
  2. Create an alias

    alias ll='ls -alF'
  3. Alias with options

    alias update='sudo apt update && sudo apt upgrade -y'
  4. Make it permanent

    echo "alias ll='ls -alF'" >> ~/.bashrc && source ~/.bashrc
  5. Remove an alias

    unalias ll

alias guides

← All Linux commands · Suggest a fix

Back to top