A collection of practical bash techniques — the stuff that’s actually useful day-to-day, not the stuff you forget after reading a 500-page book. I use all of this inside WSL and when managing my home server.

The Notes

  • Keyboard Shortcuts — readline movements, Ctrl+R search, Alt+., and the cut/paste trick with Ctrl+U/Ctrl+Y
  • History Expansion!!, !$, the typo fixer (^old^new), and previewing with :p
  • Variable Tricks — parameter expansion for path manipulation, string ops, defaults (:-, :=, :?), and arrays
  • Brace Expansion{} for quick file ops, sequences, the backup trick (cp file{,.bak}), and nesting
  • Quick Loops — one-liner for loops, while read for safety, xargs for parallelism, and common footguns
  • Process Tricks — chaining (&&, ||), background jobs, subshells, process substitution, and handy one-liners

Where to Go First

If you’re just getting started, bash-keyboard-shortcuts and bash-history-expansion give you the most speed for the least effort. After that, bash-variable-tricks and bash-brace-expansion will change how you think about file manipulation. bash-quick-loops and bash-process-tricks round it out for automation.

Good External Resources

See Also

6 items under this folder.