[Zsh] oh-my-zsh Installation and Configuration Method

Tadashi Shigeoka ·  Wed, November 19, 2014

I’ll introduce the installation and configuration method for oh-my-zsh. (Last updated: April 9, 2020)

Installing oh-my-zsh

If you’re starting from scratch, you can simply run the curl command from Basic Installation without worrying about anything else, and the installation will be complete.

Using oh-my-zsh plugins

Custom plugins are located under ~/.oh-my-zsh/plugins/. By default, only git is enabled, so you need to configure which plugins to load.

You can check the list of oh-my-zsh plugins at Plugins · ohmyzsh/ohmyzsh Wiki.

plugins=(
  adb
  ansible
  ant
  aws
  branch
  brew
  bundler
  capistrano
  colored-man-pages
  colorize
  command-not-found
  common-aliases
  copydir
  copyfile
  dirhistory
  docker
  docker-compose
  dotenv
  flutter
  gatsby
  gcloud
  gem
  git
  git-extras
  git-hubflow
  git-prompt
  gitfast
  github
  gitignore
  golang
  gradle
  grunt
  gulp
  heroku
  history
  history-substring-search
  ionic
  jsontools
  last-working-dir
  ng
  node
  npm
  npx
  nvm
  osx
  per-directory-history
  perl
  pip
  pipenv
  pj
  pod
  postgres
  pyenv
  pylint
  python
  rake
  rake-fast
  rbenv
  react-native
  redis-cli
  rsync
  ruby
  rvm
  swiftpm
  thefuck
  vscode
  xcode
)

Using your own customized settings

oh-my-zsh can load customized settings by placing shell scripts under ~/.oh-my-zsh/custom/.

ln -s ~/Dropbox/dotfiles/_oh-my-zsh_custom.sh ~/.oh-my-zsh/custom/oh-my-zsh_custom.sh

When PATH configuration doesn't work properly

If the auto-generated .zshrc has export PATH=“/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin” added to it, you should either modify it appropriately or delete it.

# User configuration

export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
# export MANPATH="/usr/local/man:$MANPATH"

In my case, I was calling export PATH= in my custom _oh-my-zsh_custom.sh. As a result, it was being overwritten by the PATH setting added to .zshrc, causing PATH to not work properly, which caused me some trouble.

That’s all from the Gemba.