If you haven’t installed zsh, first you need to install zsh to install oh my zsh.
Step 1 – Install ZSH (Z-Shell)
Oh-my-zsh is an open-source management framework for ZSH, the Z shell. It includes helpful functions, plugins, helpers, themes, and a few other things that will help you perform better at the terminal. Currently, over 275 plugins and 150 themes are supported.
For Ubuntu, Debian, Mint, Kali:
$ sudo apt install zsh
For Fedora, CentOS, RHEL:
$ sudo yum install zsh
Step 2 – Change Default shell
ZSH is automatically selected as the default shell after the installation is complete. To check the current shell, run the following command:
If your default shell isn’t ZSH, use the following command to set it as your default:
chsh -s $(which zsh)
if u are getting error like this
Use this method instead:
usermod -s $(which zsh) [username]
Step 3 – Install oh-my-zsh
You can easily install Oh My Zsh via the command-line with either
wget as shown:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Step 4 – Enable oh-my-zsh plugins
OH-MY-ZSH supports a wide range of plugins, and installing one is straightforward. Simply download the plugin package and add the plugin name to the.zshrc file’s plugins=() option. After installation, the only plugin that is enabled by default is git.
Default plugins are in the
cd ~/.oh-my-zsh/plugins/ ls -a
How to remove oh-my-zsh ?
If you want ro remove oh-my-zsh simply run the following code:
That’s all for this post on How to Install ZSH in Linux. If you have any queries let me know in the comments.