The zsh is a shell provided by Linux distributions. Even though it is not much popular as bash it has a geek user base. The oh-my-zsh is a popular tool used to manage the zsh shell configuration in an easier and more configurable way. The Oh My Zsh is open source and a community-driven framework that provides a lot of bundled functions, helpers, plugins, themes, and a lot of others.
In order to use the Oh My Zsh tool the zsh shell should be already installed. If it is not installed you can install the zsh shell with the following commands for different distributions.
Ubuntu, Debian, Mint, Kali:
$ sudo apt install zsh
Fedora, CentOS, RHEL:
$ sudo yum install zsh
The Oh My Zsh is provided with the oh-my-zsh name and provided by the project directly. Currently, it is not provided as a package for popular distributions like Ubuntu, Debian, Mint, Kali, Fedora, CentOS, RHEL. The oh-my-zsh project-provided installation can be used in two different ways. The first one is using the curl commands which will download the installation script from GitHub. But first, you should install the git tool like below.
Install git For Ubuntu, Debian, Mint, Kali:
$ sudo apt install git -y
Install git For Fedora, CentOS, RHEL:
$ sudo yum install git -y
The installation of the oh my zsh can be accomplished with the following curl command.
$ sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Alternatively the oh my zsh can be installed by using wget like below.
$ sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
The installation will start by cloning oh-my-zsh git repository to the current users’ home directory. Then you will be asked if you want to change your default shell into the zsh with the “Do you want to change your default shell to zsh? [Y/n]” line. The last step is providing the user password in this line “Password:”.
Cloning Oh My Zsh… Cloning into '/home/ismail/.oh-my-zsh'… remote: Enumerating objects: 1175, done. remote: Counting objects: 100% (1175/1175), done. remote: Compressing objects: 100% (1144/1144), done. remote: Total 1175 (delta 19), reused 1090 (delta 15), pack-reused 0 Receiving objects: 100% (1175/1175), 814.22 KiB | 1.63 MiB/s, done. Resolving deltas: 100% (19/19), done. Looking for an existing zsh config… Using the Oh My Zsh template file and adding it to ~/.zshrc. Time to change your default shell to zsh: Do you want to change your default shell to zsh? [Y/n] Changing the shell… Password: Shell successfully changed to '/usr/bin/zsh'.
Oh My Zsh Shell
The default shell will change to the Oh My Zsh like below. which provides the shell prompt different than bash which contains an arrow the current directory information.