mac,

switch from bash to zsh, and install oh-my-zsh on iTerm2

Tony Tony Follow Oct 16, 2019 · 2 mins read
switch from bash to zsh, and install oh-my-zsh on iTerm2
Share this

First setup for shell on Mac OS 10.14.2 Mojave. Install oh-my-zsh.

env.

  • Mac OS 10.14.2 Mojave
  • iTerm2 build 3.2.6

    how to install

    switch from bash to zsh

  • change shell to zsh by the next command…
    $ chsh -s /bin/zsh
    

install oh-my-zsh

install oh-my-zsh by the command below

$ curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   146  100   146    0     0    234      0 --:--:-- --:--:-- --:--:--   234
100  3952  100  3952    0     0   4481      0 --:--:-- --:--:-- --:--:--  4481
Cloning Oh My Zsh...
Cloning into '/Users/foo/.oh-my-zsh'...
remote: Enumerating objects: 1000, done.
remote: Counting objects: 100% (1000/1000), done.
remote: Compressing objects: 100% (920/920), done.
remote: Total 1000 (delta 23), reused 846 (delta 16), pack-reused 0
Receiving objects: 100% (1000/1000), 643.21 KiB | 3.28 MiB/s, done.
Resolving deltas: 100% (23/23), done.
Looking for an existing zsh config...
Using the Oh My Zsh template file and adding it to ~/.zshrc
         __                                     __
  ____  / /_     ____ ___  __  __   ____  _____/ /_
 / __ \/ __ \   / __ `__ \/ / / /  /_  / / ___/ __ \
/ /_/ / / / /  / / / / / / /_/ /    / /_(__  ) / / /
\____/_/ /_/  /_/ /_/ /_/\__, /    /___/____/_/ /_/
                        /____/                       ....is now installed!


Please look over the ~/.zshrc file to select plugins, themes, and options.

p.s. Follow us at https://twitter.com/ohmyzsh.

p.p.s. Get stickers and t-shirts at https://shop.planetargon.com.
  • exit the shell, and reopen iTerm2, then you can use oh-my-zsh

    setting oh-my-zsh

    theme

    edit oh-my-zsh theme in ~/.zshrc
    cf. https://github.com/robbyrussell/oh-my-zsh/wiki/themes

    #ZSH_THEME="robbyrussell"
    ZSH_THEME="tonotdo"
    

history

edit hist-size in ~/.oh-my-zsh/lib/history.zsh HISTSIZE=500000 SAVEHIST=100000

Join Newsletter
Get the latest news right in your inbox. We never spam!
Tony
Written by Tony Follow
Hi, I am Tony, the author of Learning Journey blog. I hope you like what I sharing!