Skip to content

WSL2 Bash power tools

Cheatsheet by Aleksandar Perisic — tools that make the terminal feel modern.

zoxide — smart directory jumping

CommandDescription
z projJump to most visited dir matching proj
ziInteractive fuzzy picker of all visited dirs
zoxide query --listList all known directories
zoxide query --list --scoreList dirs with visit frequency score
zoxide remove ~/pathForget a directory

atuin — shell history

CommandDescription
Ctrl+RFull-screen fuzzy history search
atuin searchSearch history from CLI
atuin search gitFilter history by keyword
atuin statsMost used commands ranked
atuin history listFull history with timestamps

fzf — fuzzy finder

CommandDescription
Ctrl+RFuzzy search command history
Ctrl+TFuzzy search files in current dir
Alt+CFuzzy cd into subdirectory
ls | fzfPipe anything into fzf
fzf --preview 'cat {}'Fuzzy find with file preview

File & system tools

eza — modern ls

CommandDescription
lsList with icons (aliased to eza)
llDetailed list with icons + hidden files
ltTree view 2 levels deep
eza --tree --level=3Tree view custom depth
eza --gitShow git status per file

bat — modern cat

CommandDescription
cat file.jsView file with syntax highlighting
bat --plain fileNo line numbers or decorations
bat --diff fileShow git changes inline
bat -l json fileForce a specific language highlight
bat --list-themesShow available color themes

yazi — terminal file manager

CommandDescription
yOpen yazi in current directory
h j k lNavigate (vim keys)
SpaceSelect / deselect file
y then pCopy then paste file
qQuit and cd to current dir

Git tools

lazygit — git TUI

CommandDescription
lgOpen lazygit (aliased)
SpaceStage / unstage file
cCommit with message
PPush to remote
pPull from remote
?Show all keybindings

delta — beautiful diffs

CommandDescription
git diffAuto uses delta (set in .gitconfig)
git log -pLog with delta-rendered diffs
git show HEADLast commit with syntax highlight
n / NNext / previous diff section

Productivity & environment

direnv — per-project env vars

CommandDescription
echo 'export KEY=val' > .envrcCreate env file in project folder
direnv allowTrust and activate the .envrc
direnv denyBlock a .envrc from loading
direnv reloadReload after editing .envrc
cd out && cd inVars load/unload automatically on cd

thefuck — command correction

CommandDescription
fuckFix and rerun the last failed command
fuck --yesFix without confirmation prompt

oh-my-posh — prompt themes

CommandDescription
oh-my-posh get themes-pathWhere themes are stored
ls $(oh-my-posh get themes-path)List all available themes
oh-my-posh upgradeUpdate to latest version

Tips

  • zi is the fastest way to jump around once zoxide has learned your habits
  • lg replaces most day-to-day git commands — press ? inside for keybindings
  • Put API keys in a project-root .envrc — direnv loads/unloads them automatically
  • Keep project files under ~/ not /mnt/c/ — git across the Windows filesystem boundary is slow

Bash power tools setup