Every modern Mac uses a friendly shell program called Zsh inside the Terminal. While the default terminal looks plain at first, you can easily customize it to feel like a high-speed command center tailored specifically for you.
What is an Alias?
In everyday life, a nickname saves you time when calling a friend. In the macOS Terminal, an alias is a nickname for long, clumsy terminal commands. Instead of typing git status -s -b twenty times a day, you can teach your Mac to run that whole command whenever you type just two letters: gs.
Where Do Mac Settings Live?
Your personal terminal settings live inside a hidden file in your home folder called ~/.zshrc. The tilde (~) means your user home folder, and the dot (.) means it is a configuration file.
Adding Your First Helpful Aliases
Let's open your terminal configuration file using the simple nano editor:
# Open your personal Mac Zsh settings file
nano ~/.zshrcScroll to the bottom of the file and paste these friendly, time-saving aliases:
# Clear screen shortcut
alias cls='clear'
# Quick navigation to your main projects folder
alias proj='cd ~/Documents/Projects'
# Safe directory listing with file sizes
alias ll='ls -lh'Press Ctrl + O and press Enter to save, then press Ctrl + X to exit nano.
Applying Your New Shortcuts
To tell your Mac to load your changes immediately without restarting your terminal, run:
# Refresh your terminal configuration instantly
source ~/.zshrcNow type cls and press Enter—your screen instantly clears!
3 Things to Remember
- ~/.zshrc: The single file where all your Mac Terminal settings and aliases live.
- alias: The magic word to turn long commands into short, 2-letter nicknames.
- source ~/.zshrc: Runs your updated configuration file right away.