If you are new to the macOS Terminal, typing long folder paths and repeating commands character by character can feel slow. Fortunately, macOS uses zsh (Z Shell), which comes packed with built-in keyboard shortcuts that work like speed-dial buttons.
1. Let Tab Finish Your Typing
Think of the Tab key as auto-complete on your phone. Start typing the first two or three letters of a folder or file name, then press Tab—zsh will fill in the rest automatically:
# Type "cd Doc" and press Tab:
cd Doc<Tab> # Automatically becomes: cd Documents/
2. Jump Around the Current Line
Instead of holding down the Left or Right arrow key to fix a typo at the start of a long command, use these quick jumps:
Ctrl + A: Jump straight to the beginning of the line.Ctrl + E: Jump straight to the end of the line.Ctrl + U: Clear everything before your cursor so you can start fresh.
3. Search Past Commands with Ctrl + R
Forgot the exact command you ran yesterday? Press Ctrl + R and type any word from that command (like artisan or ssh). zsh instantly searches your command history and shows the matching line—press Enter to run it, or Up / Down arrows to browse recent commands.
4. Create Your Own Short Nicknames (Aliases)
An alias lets you turn a long command into a tiny two-letter shortcut. You save aliases in a hidden settings file called ~/.zshrc:
# Add a shortcut to ~/.zshrc
echo 'alias ll="ls -la"' >> ~/.zshrc
# Reload your settings so the shortcut works right away
source ~/.zshrc
3 Things to Remember
- Use
Taboften: It autocompletes folder and file names and prevents spelling mistakes. - Move fast:
Ctrl + Ajumps to the start of a line,Ctrl + Ejumps to the end, andCtrl + Rsearches your history. - Save shortcuts: Put custom
aliascommands in~/.zshrcand activate them withsource ~/.zshrc.