LoginSignup
0
0

More than 3 years have passed since last update.

シェルの変更方法

Posted at

Linuxで新しくユーザ作成した時なんかに「あ!シェル変わってるじゃん」ということがあります。
下記手順はそんな場面を想定。

まずは現在のシェルを確認。

$ echo $SHELL
/bin/sh

あ、やっぱりshに変わってる!

現環境で使用可能なシェルを確認。

$ cat /etc/shells
/bin/sh
/bin/bash
/bin/rbash
/bin/dash
/bin/zsh
/usr/bin/zsh

使用したいシェルに変更。bashにしたい。

$ chsh
Password:
Changing the login shell for okamoto
Enter the new value, or press ENTER for the default
    Login Shell [/bin/sh]: /bin/bash

もしくはオプション(-s)を付けて、対話せずに変更。

$ chsh -s /bin/bash
Password:

変更完了。

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