Skip to content

Instantly share code, notes, and snippets.

@irfanbaigse
Forked from aaabramov/install.sh
Created January 11, 2022 12:40
Show Gist options
  • Save irfanbaigse/544514c3b835d002abf1e9f0b3b2db17 to your computer and use it in GitHub Desktop.
Save irfanbaigse/544514c3b835d002abf1e9f0b3b2db17 to your computer and use it in GitHub Desktop.
Installing zsh + oh-my-zsh on Amazon EC2 Amazon Linux 2 AMI. (Prepared in the scope of posting https://aaabramov.medium.com/installing-zsh-oh-my-zsh-on-amazon-ec2-amazon-linux-2-ami-88b5fc83109)
sudo yum update
# Installing ZSH
sudo yum -y install zsh
# Check ZSH has been installed
zsh --version
# Install "util-linux-user" because "chsh" is not available by default
# See https://superuser.com/a/1389273/599050
sudo yum install util-linux-user
# Change default shell for current user, most of the times it would be "ec2-user"
# Or use "sudo chsh -s $(which zsh) $(whoami)" to be sure
chsh -s "$(which zsh)"
# Install oh-my-zsh from https://github.com/ohmyzsh/ohmyzsh#basic-installation
# OPTIONAL
# I recommend you to install the following plugins which make your life easier and more colorful
# Assuming you have git installed
# If not, simply do "sudo yum install git -y"
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# And then add them to "~/.zshrc" file
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment