Beginner Package: bash builtin

alias

Create a shortcut for a longer command.

Syntax

alias name='command'

Description

alias defines a shorthand name that expands to a full command when typed, commonly added to a shell startup file to save typing frequently-used commands with their favourite flags.

Examples

alias ll='ls -la'
Create a shortcut for a common command
alias
List all currently defined aliases
unalias ll
Remove an alias
Add alias definitions to ~/.bashrc (or ~/.zshrc) to make them permanent across sessions.

Applies to

Ubuntu Debian Linux Mint RHEL CentOS / Rocky / AlmaLinux Fedora Arch Linux openSUSE Alpine Linux