Skip to content

Instantly share code, notes, and snippets.

@vol1ura
Last active July 3, 2021 10:11
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 vol1ura/2f91109696235e16710baab5e13ea408 to your computer and use it in GitHub Desktop.
Save vol1ura/2f91109696235e16710baab5e13ea408 to your computer and use it in GitHub Desktop.
How to install and configure zsh

How to install and configure zsh

Install on Ubuntu

  1. Install package
$ sudo apt install zsh
  1. Set zsh as a default shell
$ chsh -s $(which zsh)
  1. Install oh-my-zsh
$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Check that

  • your shell set to zsh: grep $USER /etc/passwd
  • zsh is a valid login shell: grep zsh /etc/shells
  1. If all is OK, restart your session.

Configure zsh

  1. Check settings
$ vim ~/.zshrc

and add plugins to an array

plugins=(git rails rvm virtualenv docker)
  1. Install zsh-syntax-highlighting plugin

https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/INSTALL.md

  1. Install zsh-autosuggestions plugin

https://github.com/zsh-users/zsh-autosuggestions/blob/master/INSTALL.md

Remember aliases

  1. Common aliases:
$ alias
  1. Rails aliases

https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/rails

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment