If you’re looking to enhance your terminal experience, switching to Zsh and utilizing Oh My Zsh with some fancy plugins is a great way to start. This guide will walk you through the steps to install Zsh, Oh My Zsh, and some powerful plugins to make your terminal more efficient and visually appealing.

Install zsh

First, ensure you have everything installed by running:

sudo apt update -y
sudo apt install -y curl git zsh

Install Oh My Zsh

Oh My Zsh is a framework for managing your Zsh configuration. It comes with a plethora of plugins, themes, and a useful configuration file. Install it by running the following command:

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

This script will install Oh My Zsh and set Zsh as your default shell.

Install Plugins

Zsh Syntax Highlighting - provides syntax highlighting in your Zsh shell, making it easier to read and write commands. Zsh Autosuggestions - suggests commands as you type based on your history and completions, saving you time and keystrokes.

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

Configure Oh My Zsh

Replace the default robbyrussell theme with the ys theme, which is more visually appealing and enable plugins:

sed -i 's/robbyrussell/ys/g' ~/.zshrc
sed -i 's/plugins=(git)/plugins=(git zsh-syntax-highlighting zsh-autosuggestions)/g' ~/.zshrc

Apply the Changes

Once you’ve made the changes to your .zshrc file, apply them by restarting your terminal or running:

source ~/.zshrc

You have now successfully installed and configured Zsh with Oh My Zsh and some useful plugins. Your terminal should now be more powerful and easier to use, thanks to syntax highlighting and command suggestions. Enjoy your new, supercharged terminal experience!