Skip to content

Instantly share code, notes, and snippets.

@IdrisAkintobi
Created April 3, 2025 16:22
Show Gist options
  • Save IdrisAkintobi/ee9673fb37d5a2b2773d14219d85bff3 to your computer and use it in GitHub Desktop.
Save IdrisAkintobi/ee9673fb37d5a2b2773d14219d85bff3 to your computer and use it in GitHub Desktop.
SetUp Oh My Zsh and PowerLevel10k

Oh-My-ZSH Installation and Configuration

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.

Prerequisites

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

Installation Steps

1. Install Oh-My-ZSH

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.

2. Install PowerLevel10k

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

3. Set PowerLevel10k as Your Theme

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"

4. Configure 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.

5. Install Useful Plugins

a. zsh-syntax-highlighting

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

b. zsh-autosuggestions

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

6. Enable Plugins in .zshrc

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.

7. Apply Changes

To apply the changes, either restart your terminal or run the following command:

source ~/.zshrc

Troubleshooting

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.

Customization

  • 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 the plugins=(...) list in .zshrc.

Official plugins can be found here

Enjoy your enhanced terminal experience with Oh-My-ZSH, PowerLevel10k, and these useful plugins!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment