bashrc alias shows up when admins want safer shortcuts on jump boxes — without rewriting muscle-memory commands. Shell series: bash basics; prefer functions for arguments (see below).
Where to put them
Interactive users: ~/.bashrc (often sources ~/.bash_aliases on Debian/Ubuntu).
bashsnippet
cat >> ~/.bash_aliases <<'EOF'
alias ll='ls -lah'
alias dfh='df -hT'
alias myip='ip -br a'
EOF
source ~/.bashrc

Safe patterns
Aliases with no arguments are fine; use functions when you need parameters.
bashfunction
mkcd() { mkdir -p "$1" && cd "$1"; }

Reload
Open a new session or source ~/.bashrc — cron/non-interactive shells ignore aliases.
WarningScripts should call full paths (
/usr/bin/grep) — never rely on aliases in cron.
System-wide optional
Team defaults: /etc/profile.d/myaliases.sh (no secrets in there).
bashsystem
echo "alias v='vim'" | sudo tee /etc/profile.d/10-aliases.sh

Quick Reference
- SSH shortcuts: ~/.ssh/config
- Productivity: history search
Related tutorials
Diagrams are original illustrations by Gnome IT Solutions. Tutorial text © Gnome IT Solutions.