Skip to main content

Using Zsh

Install Oh My Zsh and Supercharge Your Zsh Experience

Enahnce your Zsh experience with the awesome Oh My Zsh framework.

In my opinion, if you don't use Oh My Zsh with your z shell, you're missing out on a lot.

Let me explain.

Oh My Zsh is a framework for zsh that allows you to install zsh plugins and themes in the least complex manner possible.

It also comes bundled with various plugins that you can enable as needed.

The easiest way to install Oh My Zsh is to execute the given wget command and follow the on-screen steps:

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

Want more details? I got you.

Installing Oh My Zsh

There are two ways you can install Oh My Zsh in Linux:

  1. Using the curl command
  2. Using the wget command

Both are quite similar and use installation scripts and work without user interactions. So let's take a look at them one by one.

Using the cURL command:

If you want to use the curl command to download and install Oh My Zsh, then all you have to do is execute the following command:

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Using the wget command:

The main advantage of using the wget command is it comes pre-installed in every Linux distribution. To use the wget for installing Oh My Zsh, use the following command:

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

But you may get an error irrespective of what method you choose:

The error simply means that zsh is not installed on your system and to solve this problem, you can follow our detailed guide on how to install zsh. After installation, repeat the steps for installing Oh My Zsh.

After installing Oh My Zsh, it will prompt you to ask if you want to change your default shell to zsh or not:

Once done, it will show you a message saying Oh My Zsh is installed:

What's next? How about getting a new theme?

While Oh My Zsh comes pre-installed with a theme, it looks pretty basic and you may want to enhance the visuals even further.

I would recommend using the Powerlevel10k theme, which lets you customize the theme. Here's how to install and use Powerlevel10k:

Install and Use Powerlevel10k in Zsh
10x your Zsh setup with Powerlevel10k

What else can you do with Oh My Zsh?

Since it is a framework, you can use it to install new Zsh plugins and enhance your Zsh experience.

For example, you can enable syntax highlight and autosuggest among other things. You'll see them later in this Zsh tutorial series.

Sagar Sharma