LoginSignup
6
6

More than 5 years have passed since last update.

ログインシェルはデフォルトのまま、あたかもzshがログインシェルのようにする

Posted at

NFSでホームディレクトリが共有されているサーバ群の中で、いくつかはzshが使えないマシンがある場合にこのようなことをしています。

例えばbashなら.bashrcの先頭に下記のコードを追加するだけ。

if which zsh 1> /dev/null 2> /dev/null; then
    export SHELL=`which zsh`
    exec $(which zsh)
fi
6
6
1

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
6