LoginSignup
1
4

More than 5 years have passed since last update.

MacBook Pro 事始め zsh導入編

Last updated at Posted at 2017-01-07

zshインストール

デフォルトで入っている事を気付かなかったので、別途インストールしてしまいました。

Homebrew インストール

自分のアカウントは管理者になっているので、sudoなど使わずにそのまま実行しました。

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

ちなみに、すでにそのMacBookに /usr/local が存在するケースではエラーで止まるようです。

回避方法については、こちらのページが良いかと思います。

【El Capitan】Mac OSX 10.11にHomebrewインストール

zsh を Homebrew でインストール

brew install --without-etcdir zsh

/etc/shells を編集

vi /etc/shells

として、下記の行を追加。

/usr/local/bin/zsh

default shell を変更

chsh -s /usr/local/bin/zsh

/etc/shells/usr/local/bin/zsh が追加されていないと

chsh: /usr/local/bin/zsh: non-standard shell

と怒られてしまうので要確認です。

ターミナルを一旦終了し、再度ターミナルを起動すれば、zshで起動できているはず。

echo $SHELL
/usr/local/bin/zsh

と表示されます。

~/.zshrc を用意

vi ~/.zshrc

とする等して自分カスタマイズのzshが利用可能な準備が整いました。

~/.zshrc を読み込む

source ~/.zshrc

とすればOKです。

1
4
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
1
4