This script installs Zsh with Oh-My-Zsh, sets up a theme, and enables plugins.
- Installs Zsh with Oh-My-Zsh
- Sets up the
gnzhtheme - Enables
git,zsh-autosuggestions, andzsh-syntax-highlightingplugins - Changes default shell to Zsh
To install, run the following command:
# Install zsh
sudo apt update && sudo apt install -y zsh git wget
# Install Oh My Zsh (unattended)
sh -c "$(wget -qO- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
# Install custom plugins
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-completions
git clone https://github.com/zsh-users/zsh-syntax-highlighting ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
# Configure .zshrc (theme and plugins)
sed -i 's/ZSH_THEME=".*"/ZSH_THEME="gnzh"/' ~/.zshrc
sed -i 's/plugins=(.*)/plugins=(git zsh-autosuggestions zsh-completions zsh-syntax-highlighting)/' ~/.zshrc
# Set zsh as default shell
chsh -s $(which zsh)
zsh,git, andwgetmust be installed- Root privileges for changing default shell