LoginSignup
6
7

More than 5 years have passed since last update.

さくらVPSにzshをインストール

Last updated at Posted at 2013-04-17

さくらVPSにzshをインストールします。必須ですよね(^^)

インストール

[funya@whogex ~]$ sudo yum install zsh

今のログインシェルの確認

[funya@whogex bin]$ grep funya /etc/passwd
funya:x:500:500::/home/funya:/bin/bash
[funya@whogex bin]$ cat /etc/shells
/bin/sh
/bin/bash
/sbin/nologin
/bin/dash
/bin/tcsh
/bin/csh
/bin/zsh

利用可能なシェルリストにzshが入っているので、ログインシェルを変更します。

[funya@whogex bin]$ chsh
funya のシェルを変更します。
パスワード:
新しいシェル [/bin/bash]: /bin/zsh
シェルを変更しました。

さて、次にzshをカスタマイズしたいのですが、.zshrc というファイルをいじります。だいたい、ホームディレクトリにありますが、最初はないかもしれません。

[funya@whogex ~]$ ls -a
.   .bash_history  .bash_profile  .cpan   .mysql_history  .pki  .viminfo
..  .bash_logout   .bashrc        .cpanm  .ssh  latest-ja.zip 

ないですね。

[funya@whogex ~]$ vim .zshrc
以下の2行を書き足す。
----
autoload -U compinit
compinit
----

再起動したら一旦完了なんですが、、、

[funya@whogex ~]$ source .zshrc
-bash: autoload: コマンドが見つかりません
-bash: compinit: コマンドが見つかりません

む?
あ、chsh はログインシェルの変更だから、今のシェルを変更しなきゃね。

[funya@whogex ~]$ zsh
[funya@whogex ~]$ source .zshrc

とりあえず、これで zsh が動きます。
カスタマイズはこれから。

6
7
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
6
7