Skip to content

Configuring Oh My Zsh on CentOS

Checking the Current Shell

echo $SHELL

In most cases, this will return bin/bash.

Installing Zsh

yum install -y zsh

Changing the Default Shell to Zsh

You need to run this command as the root user:

chsh -s /bin/zsh

Installing Git

yum install -y git

Installing Oh My Zsh

Automated Installation

sh -c "$(curl -fsSL"
sh -c "$(wget -O -)"

Manual Installation

If you cannot install using the methods above (possibly due to restrictions), you can manually install Oh My Zsh with the following steps:

Download the source code:

git clone ~/.oh-my-zsh

Copy the configuration:

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

Changing the Oh My Zsh Theme

List all available themes:

ls ~/.oh-my-zsh/themes

Modify the theme:

vim ~/.zshrc

Change the default theme, which is `ZSH_THEME="robbyrussell," to your preferred one.

Reboot to Apply Changes


References and Acknowledgments

Original: This post is protected by CC BY-NC-SA 4.0 agreement, should be reproduced with attribution.

This post is translated using ChatGPT, please feedback if any omissions.