This guide covers installing and configuring tools and plugins for features like autocompletion, autosuggestions, syntax highlighting, command-line search, and better Git support.
Table of Contents
- Steps for Customizing the Linux Terminal
- Install Zsh
- Installation Commands for Various Linux Distributions
- Install Oh My Zsh
- Installation Methods: Curl and Wget
- Prerequisites: Git, Curl, and Wget Installation
- Install Nerd Fonts
- Steps for Downloading and Setting Nerd Fonts
- Set Up Powerlevel10k
- Installation Command
- Theme Configuration in
~/.zshrc
- Running the Setup Wizard
- Install Zsh Plugins
- Zsh-Autosuggestions
- Plugin Installation and Configuration
- Zsh-Syntax-Highlighting
- Plugin Installation and Configuration
- Zsh-Autosuggestions
- Install diff-so-fancy
- Installation Commands
- Integration with Git Configuration
- Install bat
- Installation Commands for Various Linux Distributions
- Usage Example
- Install fzf
- Installation Command
- Key Bindings and Usage
- Install Zsh
1. Install Zsh
The Z shell (Zsh) is a powerful Unix shell with extensive plugin and theme support allowing users to customize their terminal.
Below are commands to install Z shell:
Debian/Ubuntu:
$> sudo apt install zsh
RedHat/CentOS:
$> sudo yum install zsh
Arch/Manjaro:
$> sudo pacman -S zsh
Fedora:
$> sudo dnf install zsh
OpenSUSE:
$> sudo zypper install zsh

2. Install Oh My Zsh
Oh My Zsh is a community-driven framework for managing Zsh configuration, and providing plugins, themes, and utilities. Below are methods to install Oh My Zsh:
Using curl:
$> sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Using wget:
$> sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Make sure you have git and curl or wget installed on the system for the commands to work. To install use command below:
$> sudo apt install git
$> sudo apt install curl
$> sudo apt install wget
3. Install Nerd Fonts
Nerd Fonts are patched fonts with additional glyphs and icons. These are essential for themes like Powerlevel10k providing better visual appeal to the user.
Steps for Installation:
1. Download the Hack Font or any Nerd Font from their website.
2. Install the font by double-clicking the `.ttf` file.
3. Set the font as the default in your terminal settings.
4. Set Up Powerlevel10k
Powerlevel10k is a fast, flexible Zsh theme that enhances command-line aesthetics.
For Installation use command below:
$> git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/powerlevel10k

Steps for Configuration:
1. Set the theme in ~/.zshrc, here we are using nano text editor for demonstration:
$> sudo nano ~/.zshrc
ZSH_THEME="powerlevel10k/powerlevel10k"

2. Apply changes:
$> source ~/.zshrc
3. Run the setup wizard if not auto-started:
$> p10k configure

5. Install Zsh Plugins
1. Zsh-Autosuggestions
Zsh-Autosuggestions is a Zsh Plugin that provides real-time command suggestions as you type.
1. Use the command below to download the plugin:
$> git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

2. Add zsh-autosuggestions to the plugins array in ~/.zshrc, here we are using nano text editor for demonstration:
$> sudo nano ~/.zshrc
plugins=(... zsh-autosuggestions)

3. Apply changes:
$> source ~/.zshrc
2. Zsh-Syntax-Highlighting
Zsh-Syntax-Highlighting is a Zsh Plugin that adds syntax highlighting for commands as you type.
1. Use the command below to download the plugin:
$> git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

2. Add zsh-syntax-highlighting to the plugins array in ~/.zshrc, here we are using nano text editor for demonstration:
$> sudo nano ~/.zshrc
plugins=(... zsh-syntax-highlighting)

3. Apply changes:
$> source ~/.zshrc
6. Install diff-so-fancy
Diff-so-fancy improves the readability of Git diffs on a Linux Terminal.
Installation:
$> sudo apt install nodejs npm
$> npm i -g diff-so-fancy

To integrate diff-so-fancy with git use the commands below:
$> git config --global core.pager "diff-so-fancy | less --tabs=4 -RFX"
$> git config --global interactive.diffFilter "diff-so-fancy --patch"
$> git config --global color.ui true

Use diff-so-fancy as below:
$> git diff
7. Install bat
Bat is a modern replacement for cat with syntax highlighting and Git integration.
Use the Installation Commands below:
Debian/Ubuntu:
$> sudo apt install bat
RedHat/CentOS:
$> sudo yum install bat
Arch/Manjaro:
$> sudo pacman -S bat
Fedora:
$> sudo dnf install bat
OpenSUSE:
$> sudo zypper install bat

Use the bat command as below:
$> batcat <file>

8. Install fzf
fzf is a command-line fuzzy finder for files, commands, and more.
Use the command below for Installation:
$> git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
$> ~/.fzf/install

Key Bindings:
– Ctrl + T: Browse the file system.
– Ctrl + R: Search command history.
