Skip to content

Instantly share code, notes, and snippets.

@ruedap
Created September 16, 2012 19:55
Show Gist options
  • Save ruedap/3734140 to your computer and use it in GitHub Desktop.
Save ruedap/3734140 to your computer and use it in GitHub Desktop.
zshのインストール

zshのインストール

Homebrewからインストール

$ brew install zsh

bashからzshへの移行

使用できるシェル一覧リスト(/etc/shells)にHomebrewからインストールしたzshを追記する。

$ sudo sh -c "echo '/usr/local/bin/zsh' >> /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
/usr/local/bin/zsh   ←これ

追加できたら、そのzshに変更する

$ chsh -s /usr/local/bin/zsh
Changing shell for ruedap.
Password for ruedap: パスワードを入力する

これで新しいターミナルウィンドウを開けば、zshに切り替わっている。 念のため、元々入ってるzshではなく、Homebrewの最新の方が使われていることを確認しておく。

$ zsh --version
zsh 4.3.17 (x86_64-apple-darwin11.3.0)
$ /usr/local/bin/zsh --version
zsh 4.3.17 (x86_64-apple-darwin11.3.0)
$ /bin/zsh --version
zsh 4.3.11 (i386-apple-darwin11.0)
@thurendous
Copy link

Thanks

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