Skip to content

Instantly share code, notes, and snippets.

@elkuno213
Last active April 27, 2025 09:00
Show Gist options
  • Save elkuno213/fe0d401310134bb6012beb3627c367ee to your computer and use it in GitHub Desktop.
Save elkuno213/fe0d401310134bb6012beb3627c367ee to your computer and use it in GitHub Desktop.
Install zsh and oh-my-zsh via script

Zsh Installation Script

This script installs Zsh with Oh-My-Zsh, sets up a theme, and enables plugins.

Features

  • Installs Zsh with Oh-My-Zsh
  • Sets up the gnzh theme
  • Enables git, zsh-autosuggestions, and zsh-syntax-highlighting plugins
  • Changes default shell to Zsh

Installation

To install, run the following command:

apt-get install -y wget

# Install zsh from zsh-in-docker repository
sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/v1.2.1/zsh-in-docker.sh)" -- \
  -t gnzh \
  -p git \
  -p https://github.com/zsh-users/zsh-autosuggestions \
  -p https://github.com/zsh-users/zsh-completions \
  -p https://github.com/zsh-users/zsh-syntax-highlighting
  
# Setup zsh as default shell (optional)
chsh -s $(which zsh) $(whoami)

Requirements

  • git, zsh, and wget must be installed
  • Root privileges for changing default shell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment