Zsh Setup and Customization Guide

1. Install Zsh and Essential Tools

Begin by installing Zsh and some prerequisites:

sudo apt update
sudo apt install zsh git fonts-font-awesome

Switch to Zsh:

zsh

When prompted, select Option 0 to start with an empty .zshrc file.


2. Install Plugins and Powerlevel10k Theme

Download and install the plugins and theme by cloning their repositories:

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/powerlevel10k

3. Configure Plugins and Theme in .zshrc

Edit your .zshrc file to enable plugins and apply the Powerlevel10k theme:

vim ~/.zshrc

Inside the file:

  • Add the following plugins:
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
  • Set the Powerlevel10k theme:
ZSH_THEME="powerlevel10k/powerlevel10k"

Save and exit Vim


4. Restart Zsh and Configure Powerlevel10k

Restart Zsh to apply your changes:

zsh

The Powerlevel10k configuration wizard will appear. Follow the prompts to customize your terminal’s appearance. You can choose from a variety of styles and features, including icons, separators, and color schemes.

To reconfigure the theme later, run:

p10k configure