This README provides step-by-step instructions for installing and configuring Oh-My-ZSH with PowerLevel10k theme and useful plugins for a better terminal experience.
Ensure that you have zsh
and git
installed on your system before proceeding with the installation.
- For Ubuntu, use:
sudo apt install zsh git
- For macOS, use:
brew install zsh git
Oh-My-ZSH is a framework for managing your ZSH configuration. To install it, run the following command in your terminal:
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
This will install Oh-My-ZSH and set it as the default shell.
PowerLevel10k is a popular ZSH theme that provides a highly customizable and visually appealing prompt.
To install PowerLevel10k, clone the repository to the ZSH_CUSTOM/themes
directory:
gh repo clone romkatv/powerlevel10k $ZSH_CUSTOM/themes/powerlevel10k
Open your .zshrc
configuration file located in your home directory:
nano ~/.zshrc
Look for the ZSH_THEME
variable and change it to:
ZSH_THEME="powerlevel10k/powerlevel10k"
To configure PowerLevel10k, run the following command in your terminal:
p10k configure
This will launch a configuration wizard that allows you to customize the appearance of your prompt.
zsh-syntax-highlighting
provides syntax highlighting for your ZSH commands, making them easier to read and identify errors.
To install zsh-syntax-highlighting
, clone the repository into your plugins directory:
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
zsh-autosuggestions
provides autocompletion suggestions based on your history as you type commands.
To install zsh-autosuggestions
, clone the repository into your plugins directory:
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
To enable the plugins, open your .zshrc
file again:
nano ~/.zshrc
Find the line that starts with plugins=(...)
and add the following plugins inside the parentheses:
plugins=(git zsh-syntax-highlighting zsh-autosuggestions)
Save and exit the .zshrc
file.
To apply the changes, either restart your terminal or run the following command:
source ~/.zshrc
If you encounter any issues, ensure that:
- You have the latest version of ZSH installed.
- You have properly configured the
.zshrc
file. - All dependencies (e.g.,
git
,curl
) are installed correctly.
- You can further customize your PowerLevel10k prompt by editing the
~/.p10k.zsh
file. - To add more plugins, simply clone the respective repositories into the
${ZSH_CUSTOM}/plugins
folder and add them to theplugins=(...)
list in.zshrc
.
Official plugins can be found here
Enjoy your enhanced terminal experience with Oh-My-ZSH, PowerLevel10k, and these useful plugins!