PDF Tools
← Dev Tools

Tab Completion Basics

Featurebashzshfish
File / directory completionTabTabTab
Command completionTabTabTab
Cycle through matchesTab (twice)Tab repeatedlyTab repeatedly
List all matchesTab (twice)Tab (once)Tab (once)
Variable completion ($VAR)TabTabTab
Username completion (~user)TabTabTab
Hostname completion (@host)TabTabTab
Command options (--flag)Tab (after -)TabTab

History Search & Navigation

Actionbashzshfish
Reverse history searchCtrl+RCtrl+RCtrl+R
Forward history searchCtrl+SCtrl+SCtrl+S
Previous command↑ / Ctrl+P↑ / Ctrl+P↑ / Ctrl+P
Next command↓ / Ctrl+N↓ / Ctrl+N↓ / Ctrl+N
Beginning of lineCtrl+ACtrl+ACtrl+A
End of lineCtrl+ECtrl+ECtrl+E

Kill / Yank (Cut / Paste)

Actionbashzshfish
Cut from cursor to endCtrl+KCtrl+KCtrl+K
Cut from cursor to startCtrl+UCtrl+UCtrl+U
Cut word backwardsCtrl+WCtrl+WCtrl+W
Cut word forwardsAlt+DAlt+DAlt+D
Paste last cut textCtrl+YCtrl+YCtrl+Y
Transpose charactersCtrl+TCtrl+TCtrl+T

Directory Navigation

Actionbashzshfish
Go to home directorycd (alone) / cd ~cd (alone) / cd ~cd (alone) / cd ~
Go to previous directorycd -cd -cd -
Directory stackpushd / popd / dirspushd / popd / dirspushd / popd / dirs
Autocd (type dir name)shopt -s autocdsetopt autocdBuilt-in
Fuzzy dir matchingTab (with completion)Tab

Process Management

Actionbashzshfish
Interrupt (SIGINT)Ctrl+CCtrl+CCtrl+C
Suspend (SIGTSTP)Ctrl+ZCtrl+ZCtrl+Z
End of file (EOF)Ctrl+DCtrl+DCtrl+D
Clear screenCtrl+LCtrl+LCtrl+L
Jobs listjobsjobsjobs
Foreground jobfgfgfg
Background jobbgbgbg

How to Use

1

Browse the tables

Scroll through the reference tables for bash, zsh, and fish shell shortcuts.

2

Find your shell

Locate the column for your preferred shell (bash, zsh, or fish).

3

Learn and apply

Use the shortcuts in your terminal to improve productivity.