LoginSignup
14
12

More than 5 years have passed since last update.

ログイン時のshellを変更する

Last updated at Posted at 2015-08-02

新規ユーザーを作り、そのユーザーでログインするとshが立ち上がってしまってbashコマンドを毎回入力しなければならずとても不便だった時の解決方法。

解決法

/etc/passwd

を開くと、
root:x:0:0:root:/root:/bin/bash
このような物がユーザー毎にあるので、変更したいユーザーの最後の項目に変更したいshellのパスにしてログインし直す。
自分の場合は何も指定されてない状態だったので、
/bin/bash
とする事でログイン時からbashにする事ができた。

追記

コメントいただきました。
chsh -s /bin/bash
chshコマンドを使っての変更の方がファイルを誤って破壊する事がないので安心です。

14
12
2

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
14
12