Aliases

Aliases are a simple way to create short, memorable shortcuts for longer shell commands. They're useful for speeding up repetitive tasks and making commands easier to type.

Quick reference

Make aliases persistent (zsh / bash)

  1. Open your shell config file (for zsh, typically ~/.zshrc; for bash, ~/.bashrc or ~/.bash_profile):

nano ~/.zshrc

  1. Add your alias lines, for example:

alias ll="ls -la" alias gs="git status"

  1. Save the file and reload the config (or open a new terminal):

source ~/.zshrc

Fish shell

Fish uses a different syntax and has a builtin helper:

alias ll='ls -la'
functions --save ll

Notes and tips

Removing aliases permanently

GMP (project-specific shortcuts)

Here are two example aliases used in my GMP workflow. Put these in your ~/.zshrc or project-specific rc file.

If you use SSH config (~/.ssh/config) you can set Host entries and then use short ssh commands in aliases without long hostnames or options.

Examples — full workflow

  1. Add aliases to ~/.zshrc:

    alias ll="ls -la" alias gs="git status" alias bts="ssh bts"

  2. Reload your shell:

    source ~/.zshrc

  3. Use the alias:

    ll

Troubleshooting

Short summary