Skip to content

Instantly share code, notes, and snippets.

@defaye
Last active December 23, 2020 12:15
Show Gist options
  • Save defaye/8f66049f8ae53930b89bc6eb7b516ea2 to your computer and use it in GitHub Desktop.
Save defaye/8f66049f8ae53930b89bc6eb7b516ea2 to your computer and use it in GitHub Desktop.
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
source ~/.zshrc
@defaye
Copy link
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