This document is a step-by-step guide to transforming your terminal into an ultra-fast and smart tool. You will learn how to install and configure Oh My Zsh, zoxide, and fzf, and how to combine them to navigate your system at the speed of light.
If you want to install and configure everything automatically, download and run the install.sh script:
chmod +x install.sh
./install.sh- How to install Oh My Zsh
- How to install zoxide
- How to use zoxide
- How to install fzf
- How to use fzf
- The Winning Combo: Benefits and how to combine them
Oh My Zsh is a framework for managing your Zsh configuration. It includes hundreds of plugins and themes that will make your life easier.
Make sure you have zsh, curl, and git installed on your system.
Run the following command in your terminal:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"The script will clone the repository and automatically change your default shell to Zsh.
zoxide is a smarter cd command. It remembers which directories you use most frequently, so you can jump to them in just a few keystrokes.
Depending on your operating system, run:
- macOS(Homebrew):
brew install zoxide - Ubuntu/Debian:
sudo apt install zoxide - Fedora:
sudo dnf install zoxide - Arch Linux:
sudo pacman -S zoxide
For your terminal to recognize the command, you need to add it to your configuration. Run this:
echo 'eval "$(zoxide init zsh)"' >> ~/.zshrc
source ~/.zshrcOnce installed, you will use the z command instead of cd.
zoxide learns from your navigation habits. At first, you'll need to move around your folders normally, but soon you'll be able to use these magic shortcuts:
z foo-> Jumps to the highest-ranked directory matching "foo" (e.g.,~/Projects/foo).z foo bar-> Jumps to the highest-ranked directory matching "foo" and "bar" (e.g.,~/Projects/foo/src/bar).z --> Goes back to the previous directory.z ..-> Goes up one level in the folder path.
fzf (Fuzzy Finder) is a general-purpose command-line fuzzy finder. It allows you to search for files, history, and processes by typing fragments of words in any order.
This is the best way to install it to ensure you automatically activate the Zsh keyboard shortcuts:
# 1. Clone the official repository
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
# 2. Run the installation script
~/.fzf/install(During installation, answer y to all prompts to enable auto-completion and key bindings).
Finally, reload your terminal:
source ~/.zshrcThe real magic of fzf lies in its built-in keyboard shortcuts:
CTRL + R(Search History): The most useful shortcut. Start typing parts of an old command andfzfwill find it. PressEnterto paste it into your terminal.CTRL + T(Search Files): Searches for files in your current directory and its subdirectories. When you pressEnter, it pastes the file path into the command line (great for opening files with nano, vim, or code).ALT + C(Move to Folders): Searches for a directory and automaticallycds into it.
As a filter (Pipes):
You can pipe the output of any command into fzf to search through it visually:
cat giant_file.txt | fzf
ps aux | fzf- Zero mental load: You no longer need to remember extremely long absolute paths or the exact order of commands thanks to fuzzy searching.
- Extreme speed: What used to take multiple commands (
cd ..,ls,cd folder), now takes just one quick command (z folder). - Maximum efficiency:
CTRL + Rwithfzfensures you never have to type a complex command twice.
When you have zoxide and fzf installed at the same time, you unlock a hidden superpower: the zi command.
zi combines the smart database of your frequent folders (zoxide) with the interactive visual finder (fzf).
- Type
ziin your terminal and pressEnter. - The visual
fzfinterface will open, showing a list of your most visited folders. - Type any letter to filter the list instantly.
- Select the folder using the arrow keys and press
Enterto jump right there.
It is the ultimate way to navigate your system like a pro!
AI was used in order to help with the writing of this README.md document.