[Server & Network General] シェルを csh から zsh へ変更する

「さくらのレンタルサーバ スタンダード」のシェルを変更。

[markdown]
## 変更

以下で現在のシェルと変更可能なシェルを確認。

“`prettyprinted
% echo $shell
% cat /etc/shells
“`

シェルの変更を行い、一度ログアウト。

“`prettyprinted
% chsh -s /usr/local/bin/zsh
Password:
chsh: user information updated
% exit
“`

ssh ログイン。
`0` で `~/.zshrc` を作成。

“`prettyprinted
% ssh ****
Last login: Wed May 25 17:21:45 2016 from ****
FreeBSD 9.1-RELEASE-p24 (SAKURA**) #0: Thu Feb 5 10:03:29 JST 2015
Welcome to FreeBSD!
This is the Z Shell configuration function for new users,
zsh-newuser-install.
You are seeing this message because you have no zsh startup files
(the files .zshenv, .zprofile, .zshrc, .zlogin in the directory
~). This function can help you with a few settings that should
make your use of the shell easier.
You can:
(q) Quit and do nothing. The function will be run again next time.
(0) Exit, creating the file ~/.zshrc containing just a comment.
That will prevent this function being run again.
(1) Continue to the main menu.
— Type one of the keys in parentheses — 0
zsh: permission denied: /var/mail/****
“`

permission で怒られるが、これは後述の設定で対応する。

## 設定

以下の設定を追加。

> * [さくらインターネットのレンタルサーバーのシェルをcshからzshに変更する – Qiita](http://qiita.com/sizucca/items/b2200bae5449032c57fe)

“`:~/.zshrc
# 日本語が文字化けしないよう文字コードを指定
export LANG=ja_JP.UTF-8
# zshにメールチェックをさせない
export MAILCHECK=0
“`

さらにこちらも追加。ありがとうございます。

> * [少し凝った zshrc](https://gist.github.com/mollifier/4979906)
すぐに利用する場合は、以下でファイルを読み込み直す。

“`prettyprinted
% source ~/.zshrc
“`
[/markdown]