Search

How to Install Oh My Zsh in Ubuntu

post-title

Your terminal never felt this good before.

Sometimes you are getting bored with one desktop environment, for example Unity or Gnome.
So what you do is install new desktop environment and apply for different experience. In the same way, what you do when you get bored with same colors and text in Terminal? There comes Oh My ZSH!.

Zsh(Z Shell) is also shell program just as bash or sh. Oh My ZSH! is a framework for Zsh. In the fact it is Linux shell program with advance feature like Colourful themes, syntax highlight, Git integration, spelling correction.

In this article , we will describe you how to install "Oh my ZSH!" and change themes. Just follow these steps to install Oh My ZSH!.

Note: You need to be logged in as root user with sudo privileges.

1. Update your package repository.

sudo apt-get update

2. Install prerequisites dependencies

sudo apt-get install zsh curl git git-core

3. Download source file

sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

4. Copy ZSH configuration file to home directory

cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc

It will create .zshrc file in home directory. Fine the line ZSH_THEME="robbyrussell" and replace robbyrussell with agnoster and save the changes.

5. Make zsh your default shell, run following command.

chsh -s /bin/zsh

You will need to logout and then login to get changes. Now open Terminal. your default shell will be replace with ZSH!.

6. Back to the bash shell, run the following command, logout and login to system. 

chsh -s /bin/bash

7. Add custom pluggins to zsh
If you want to add custom plugin in Zsh, copy plugin to ~/.oh-my-zsh/custom/plugins. To use a plugin and add it to the plugins list with space in your ~/.zshrc file.

plugins=(git zsh-autosuggestions)

Also take note that more plugins will slow your shell, so be wise to add plugins.

I hope you liked this article.