Skip to content

Instantly share code, notes, and snippets.

@OndrejValenta
Last active November 14, 2024 15:43
Show Gist options
  • Save OndrejValenta/41c4c60f837ccd56c57ba496177676b3 to your computer and use it in GitHub Desktop.
Save OndrejValenta/41c4c60f837ccd56c57ba496177676b3 to your computer and use it in GitHub Desktop.

Install Zsh and Oh-my-zsh on CentOS 7

Based on this article

ALL INSTALLATIONS ASSUME YES WHEN PROMPTED, that's what -y does

This script can be copy paste to ssh as is. No hands installation. :-)

yum install zsh -y
chsh -s /bin/zsh root
echo $SHELL
yum install wget git -y
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh

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

@Mohammed-5253
Copy link

If anyone wants ready data for ubuntu, it is here

# Install Zsh
sudo apt-get update
sudo apt-get install zsh -y

# Change the default shell for the root user
sudo chsh -s /bin/zsh root

# Check the default shell for the root user
echo $SHELL

# Install wget and git
sudo apt-get install wget git -y

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

# Copy the Zsh configuration template
/bin/cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc

# Source the Zsh configuration
source ~/.zshrc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment