How to Create Command Shortcuts in Linux (alias)

alias creates a shortcut name for a longer command, saved for the duration of the shell session (or permanently if added to a shell config file).

Published October 1, 2026

alias creates a shortcut name for a longer command, saved for the duration of the shell session (or permanently if added to a shell config file).

Key points

  • alias ll="ls -lah" makes "ll" run the longer ls -lah command
  • Add alias definitions to ~/.bashrc or ~/.zshrc to make them available in every new terminal session
  • Run alias with no arguments to list all currently defined aliases

Example

alias gs="git status"
More Linux articles