๐ Complete Zsh Terminal Customization Guide
June 26, 2026 ยท View on GitHub
Fedora & Debian/Ubuntu
A comprehensive guide to transform your terminal with Zsh, Oh My Zsh, and Powerlevel10k theme โ covering both DNF-based and APT-based distros.
๐ Table of Contents
- Prerequisites
- Installing Zsh
- Setting Up Oh My Zsh
- Installing Fonts
- Powerlevel10k Theme
- Essential Plugins
- Additional Tools
- Configuration
- Terminal Font Setup
- Apply Everything
- OS Icon Customization
- Troubleshooting
- Quick Reference
๐ฆ Prerequisites
Update your system and install required packages:
Fedora:
sudo dnf update -y
sudo dnf install zsh git curl wget fontconfig -y
Debian/Ubuntu:
sudo apt update && sudo apt upgrade -y
sudo apt install zsh git curl wget fontconfig -y
๐ Installing Zsh
Step 1: Install and Set as Default
# Make Zsh your default shell (same on both distros)
chsh -s $(which zsh)
# Verify installation
zsh --version
โ ๏ธ Important: Log out and log back in after changing your default shell.
Step 2: First Run Configuration
When you first open the terminal after logging back in, you'll see the Zsh configuration wizard.
Press 0 (zero) and hit Enter to create a basic .zshrc file.
๐จ Setting Up Oh My Zsh
Install Oh My Zsh framework (same command on all distros):
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
When prompted:
- "Do you want to change your default shell to zsh?" โ Type
Y - Enter your password if requested
๐ค Installing Fonts
Download and install Powerlevel10k compatible fonts (same on all distros):
mkdir -p ~/.local/share/fonts
cd ~/.local/share/fonts
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf
fc-cache -f -v
cd ~
โก Powerlevel10k Theme
Install the Powerlevel10k theme (same on all distros):
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
๐ Essential Plugins
All plugin installs are identical across distros:
# Autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# Syntax Highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
# Completions
git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions
# FZF (Fuzzy Finder)
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install --all
๐ ๏ธ Additional Tools
Standard Repository Tools
Fedora:
sudo dnf install bat ripgrep htop fastfetch autojump ncdu tree -y
Debian/Ubuntu:
sudo apt install bat ripgrep htop neofetch autojump ncdu tree -y
Note: On Fedora the command is
bat; on Debian/Ubuntu the command isbatcat. The aliases section below handles this automatically.
Note: On Fedora use
fastfetch; on Debian/Ubuntu useneofetch.
Install Eza (Modern ls replacement)
โ ๏ธ Eza is NOT available in Fedora 42+ repos and may not be in some Debian/Ubuntu repos. Install manually from GitHub releases:
cd /tmp
wget https://github.com/eza-community/eza/releases/latest/download/eza_x86_64-unknown-linux-gnu.tar.gz
tar -xzf eza_x86_64-unknown-linux-gnu.tar.gz
sudo chmod +x eza
sudo chown root:root eza
sudo mv eza /usr/local/bin/eza
eza --version
rm eza_x86_64-unknown-linux-gnu.tar.gz
cd ~
Alternative if eza fails: Use lsd instead.
Fedora: sudo dnf install lsd -y
Debian/Ubuntu: sudo apt install lsd -y
Then update the aliases in .zshrc:
alias ll='lsd -l'
alias la='lsd -la'
alias ls='lsd'
alias lt='lsd --tree --depth=2'
What these tools do:
| Tool | Description |
|---|---|
eza / lsd | Modern replacement for ls with colors and icons |
bat / batcat | Better cat with syntax highlighting |
ripgrep | Ultra-fast search tool |
htop | Interactive process viewer |
fastfetch / neofetch | System information display |
autojump | Smart directory navigation |
ncdu | Disk usage analyzer |
tree | Directory tree viewer |
โ๏ธ Configuration
Edit .zshrc
nano ~/.zshrc
1. Change Theme (around line 11)
Find:
ZSH_THEME="robbyrussell"
Replace with:
ZSH_THEME="powerlevel10k/powerlevel10k"
2. Configure Plugins (around line 73)
Find:
plugins=(git)
Fedora โ replace with:
plugins=(
git
sudo
docker
npm
python
dnf
systemd
zsh-autosuggestions
zsh-syntax-highlighting
zsh-completions
colored-man-pages
extract
history
fzf
)
Debian/Ubuntu โ replace with:
plugins=(
git
sudo
docker
npm
python
command-not-found
zsh-autosuggestions
zsh-syntax-highlighting
zsh-completions
colored-man-pages
extract
history
autojump
fzf
)
โ ๏ธ Fedora note: Do NOT add
autojumpto the plugins list on Fedora โ it will be sourced manually below to avoid Oh My Zsh errors.
3. Add Custom Configuration at the End
Add these lines at the END of ~/.zshrc:
Fedora:
# ==========================================
# CUSTOM CONFIGURATION
# ==========================================
# Completions
fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions/src
# Aliases
alias ll='eza -l --icons'
alias la='eza -la --icons'
alias ls='eza --icons'
alias lt='eza --tree --level=2 --icons'
alias cat='bat --paging=never'
alias update='sudo dnf update -y'
alias install='sudo dnf install'
alias remove='sudo dnf remove'
alias search='dnf search'
alias cls='clear'
alias ..='cd ..'
alias ...='cd ../..'
# Better History
HISTSIZE=10000
SAVEHIST=10000
setopt HIST_IGNORE_ALL_DUPS
# Autojump (sourced manually on Fedora โ path uses .zsh extension)
if [ -f /usr/share/autojump/autojump.zsh ]; then
source /usr/share/autojump/autojump.zsh
fi
# FZF
if [ -f ~/.fzf.zsh ]; then
source ~/.fzf.zsh
fi
# Powerlevel10k
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
Debian/Ubuntu:
# ==========================================
# CUSTOM CONFIGURATION
# ==========================================
# Completions
fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions/src
# Aliases
alias ll='eza -l --icons'
alias la='eza -la --icons'
alias ls='eza --icons'
alias lt='eza --tree --level=2 --icons'
alias cat='batcat --paging=never'
alias update='sudo apt update && sudo apt upgrade'
alias cls='clear'
alias ..='cd ..'
alias ...='cd ../..'
# Better History
HISTSIZE=10000
SAVEHIST=10000
setopt HIST_IGNORE_ALL_DUPS
# Autojump (path uses .sh extension on Debian/Ubuntu)
[[ -s /usr/share/autojump/autojump.sh ]] && source /usr/share/autojump/autojump.sh
# FZF
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# Powerlevel10k
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
Save the file: Press Ctrl+O, then Enter, then Ctrl+X
๐ฅ๏ธ Terminal Font Setup
GNOME Terminal (Fedora / Ubuntu)
- Open Terminal Preferences (right-click in terminal โ Preferences)
- Navigate to Profile โ Text
- Check "Custom font"
- Select "MesloLGS NF Regular" (size 11 or 12 recommended)
- Click Select and close preferences
Konsole (KDE Plasma)
- Open Settings โ Edit Current Profile
- Go to Appearance tab
- Click "Select Font"
- Choose "MesloLGS NF", size 11 or 12
- Click OK
๐ฏ Apply Everything
source ~/.zshrc
Then run the interactive Powerlevel10k wizard:
p10k configure
Tips:
- Answer questions about what you can see (diamonds, icons, etc.)
- Rainbow or Lean style recommended
- You can re-run this anytime
Final Check
Fedora: fastfetch
Debian/Ubuntu: neofetch
You should now see your beautiful customized terminal! ๐
๐จ OS Icon Customization
Change the OS icon shown in the prompt:
nano ~/.p10k.zsh
Find (around line 1250):
typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='โญ'
Fedora options (uncomment one):
#typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION=''
#typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='๓ฐฃ'
#typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION=''
#typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='๓ฑ'
#typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='๓ฐฝ'
#typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION=''
source ~/.zshrc
Browse more icons at: https://www.nerdfonts.com/cheat-sheet
๐ How to Find & Use Icons
Method 1: Nerd Fonts Cheat Sheet (Recommended)
- Open https://www.nerdfonts.com/cheat-sheet in your browser
- Use the search box to find an icon by name (e.g.
linux,arch,debian,ubuntu,fedora) - Click the icon โ it copies the UTF-8 character to your clipboard
- Paste it directly into
~/.p10k.zsh:typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='<paste here>' - Save and reload:
source ~/.zshrc
โ ๏ธ Tip: Make sure your terminal font is set to MesloLGS NF (or any Nerd Font), otherwise the icon will show as a box or
?.
Method 2: Search Icons via Terminal
If you want to browse icons without leaving the terminal, use fzf + a small script to search Nerd Font codepoints:
# One-liner to list all nerd font icons with fzf (requires fzf)
curl -s https://raw.githubusercontent.com/ryanoasis/nerd-fonts/master/glyphnames.json \
| python3 -c "
import sys, json
data = json.load(sys.stdin)
for name, info in data.items():
code = int(info['code'], 16)
try:
print(f\"{chr(code)} {name} (U+{info['code'].upper()})\")
except:
pass
" | fzf
Copy the character from the fzf result and paste it into ~/.p10k.zsh.
Method 3: Unicode/Emoji Icons (No Font Needed)
You can also use plain Unicode emoji instead of Nerd Font icons:
typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='๐ง' # Linux penguin
typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='๐' # Rocket
typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='๐ป' # Laptop
Browse emoji at: https://emojipedia.org
๐ Troubleshooting
Fix Instant Prompt Warning
If you see:
[WARNING]: Console output during zsh initialization detected.
Cause: Something prints to console before Powerlevel10k is ready โ most commonly autojump in the plugins list.
Fix:
- โ
Remove
autojumpfromplugins=()(Fedora only) - โ
Source it manually at the end of
.zshrcwith proper checks (as shown above)
Or suppress it:
typeset -g POWERLEVEL9K_INSTANT_PROMPT=quiet
Fix Autojump "Not Found" Error (Fedora)
Error: [oh-my-zsh] autojump not found
Fix: Remove autojump from plugins=() and source it manually:
if [ -f /usr/share/autojump/autojump.zsh ]; then
source /usr/share/autojump/autojump.zsh
fi
Verify install:
dnf list installed | grep autojump
# or reinstall:
sudo dnf install autojump -y
Autojump Path Differences
| Distro | Path |
|---|---|
| Fedora | /usr/share/autojump/autojump.zsh |
| Debian/Ubuntu | /usr/share/autojump/autojump.sh |
Fix Eza Not Found
Re-install eza manually:
cd /tmp
wget https://github.com/eza-community/eza/releases/latest/download/eza_x86_64-unknown-linux-gnu.tar.gz
tar -xzf eza_x86_64-unknown-linux-gnu.tar.gz
sudo chmod +x eza && sudo chown root:root eza
sudo mv eza /usr/local/bin/eza
rm eza_x86_64-unknown-linux-gnu.tar.gz
cd ~
which eza && eza --version
Fix bat / batcat Command
| Distro | Correct command |
|---|---|
| Fedora | bat |
| Debian/Ubuntu | batcat |
Make sure your alias in .zshrc matches the right command for your distro.
Fix FZF Error
If FZF throws errors:
nano ~/.fzf.zsh
Replace line 7 (source <(fzf --zsh)) with:
# Auto-completion
[[ $- == *i* ]] && source "$HOME/.fzf/shell/completion.zsh" 2> /dev/null
# Key bindings
source "$HOME/.fzf/shell/key-bindings.zsh"
Full correct ~/.fzf.zsh:
# Setup fzf
if [[ ! "$PATH" == *$HOME/.fzf/bin* ]]; then
PATH="${PATH:+${PATH}:}$HOME/.fzf/bin"
fi
[[ $- == *i* ]] && source "$HOME/.fzf/shell/completion.zsh" 2> /dev/null
source "$HOME/.fzf/shell/key-bindings.zsh"
Fix cat Command Hanging
If cat hangs, use:
/usr/bin/cat filename
# or
nano filename
The alias already includes --paging=never to prevent this.
SELinux Issues (Fedora only)
If fonts or themes have permission errors:
# Check status
getenforce
# Temporarily set permissive (until reboot)
sudo setenforce 0
๐ Quick Reference
Aliases
| Alias | Fedora Command | Debian/Ubuntu Command | Description |
|---|---|---|---|
ll | eza -l --icons | eza -l --icons | List with details |
la | eza -la --icons | eza -la --icons | List all + hidden |
lt | eza --tree --level=2 --icons | same | Tree view |
cat | bat --paging=never | batcat --paging=never | Better cat |
update | sudo dnf update -y | sudo apt update && upgrade | System update |
cls | clear | clear | Clear terminal |
.. | cd .. | cd .. | Go up one level |
... | cd ../.. | cd ../.. | Go up two levels |
Key Bindings
| Shortcut | Action |
|---|---|
Ctrl+R | Search command history (FZF) |
Ctrl+T | Search files (FZF) |
Alt+C | Change directory (FZF) |
Tab | Auto-complete with suggestions |
โจ Features You Now Have
- ๐จ Beautiful Powerlevel10k prompt with Git integration
- ๐ก Intelligent command suggestions
- ๐ Syntax highlighting
- ๐ Fuzzy file and history search
- ๐ Smart directory jumping
- ๐ Modern CLI tools (eza, bat, ripgrep)
- โจ๏ธ Enhanced tab completions
๐ Additional Resources
Enjoy your supercharged terminal! ๐