Skip to content

Instantly share code, notes, and snippets.

@defaye
Last active December 23, 2020 12:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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