Skip to content

Instantly share code, notes, and snippets.

@defaye defaye/install_zsh.sh
Last active Jun 2, 2020

Embed
What would you like to do?
Install ZSH with Oh-My-ZSH including some useful plugins on Ubuntu 18.04
sudo apt update && sudo apt install -y zsh git-core fonts-powerline curl
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
chsh -s `which zsh`
touch ~/.zshrc
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
sed -i -E "s/ZSH_THEME=.*/ZSH_THEME=\"agnoster\"/" ~/.zshrc
git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions
sed -i -E "s/^plugins=\((.*)\)/plugins=(\1 zsh-completions)/" .zshrc
sed -i -E "s/^plugins=.*$/&\nautoload -U compinit \&\& compinit/" .zshrc
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
sed -i -E "s/^plugins=\((.*)\)/plugins=(\1 zsh-autosuggestions)/" .zshrc
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
sed -i -E "s/^plugins=\((.*)\)/plugins=(\1 zsh-syntax-highlighting)/" .zshrc
@defaye

This comment has been minimized.

Copy link
Owner Author

defaye commented Jun 2, 2020

To run this command in one line:

curl -s https://gist.github.com/defaye/8f66049f8ae53930b89bc6eb7b516ea2/raw/c32979d582e2e3cd803ae117d693fe809b64378e/install_zsh.sh | sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.