LoginSignup
0
0

More than 5 years have passed since last update.

Install "zsh" for MacOSX

Last updated at Posted at 2018-03-25

Installing "zsh" to MacOSX, you can use command line easily than before.

Update "homebrew"

※If you don't install "homebrew" yet start from here.

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

※If you already installed "homebrew" start from here.

$ brew update

# Check whether you can use brew or not.(correct case)
$ brew doctor
=> Your system is ready to brew.

install the zsh

$ brew install --disable-etcdir zsh

After finished, check the version of the zsh.

$ zsh --version
=> zsh 5.4.2 (x86_64-apple-darwin17.3.0)

Change the login shell for the zsh.

First step: Edit /etc/shells

$ cat /etc/shells
# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.

/bin/bash
/bin/csh
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh

↓↓

# add the script "/usr/local/bin/zsh"

$ sudo vi /etc/shells
# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.

/bin/bash
/bin/csh
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh
/usr/local/bin/zsh

Second Step: change the setting of the login shell.

$ chsh -s /usr/local/bin/zsh
# Enter password

### Setting for the Zsh
#### Install "oh-my-zsh"

```shell
$ curl -L http://install.ohmyz.sh | sh

Reboot the Terminal.

Edit "~/.zshrc"


$ vi ~/.zshrc
...
plugins=(
  git
)

↓↓

# add some items in the brackets.
plugins=(
  git
  ruby
  osx
  bundler
  brew
  rails
  emoji-clock
)

# Save the setting.

Reload "~/.zshrc"

$ source ~/.zshrc

Finish.

You can change the setting of "zsh" what you want.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0